vendredi 29 septembre 2017

gcc std::regex with -fpack-struct seg faults

Consider the following simple c++ program

#include <iostream>
#include <regex>
int main(int argc, char * argv[])
{
    std::regex foobar( "[A]+");

    return 0;
}

When compiling with -fpack-struct=1 it seg faults

g++-5 -std=gnu++14 ./fpack_regex.cpp -fpack-struct=1 -o a.out && a.out
Segmentation fault (core dumped)

While

g++-5 -std=gnu++14 ./fpack_regex.cpp -o a.out && a.out

works just fine.

Any clue why the pack-struct=1 option might cause this failure?

Aucun commentaire:

Enregistrer un commentaire