https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61601
Bug ID: 61601 Summary: C11 regex resource exhaustion Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: max at cert dot cx cx@cx:~/REstd11/kozak5$ ~/gcc49/bin/g++ -v Using built-in specs. COLLECT_GCC=/home/cx/gcc49/bin/g++ COLLECT_LTO_WRAPPER=/home/cx/gcc49/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /home/cx/gcc49/source/gcc-4.9.0/configure --disable-multilib --prefix=/home/cx/gcc49 Thread model: posix gcc version 4.9.0 (GCC) cx@cx:~/REstd11/kozak5$ ~/gcc49/bin/g++ -o regr regr.cpp -std=c++11cx@cx:~/REstd11/kozak5$ cat ./regr.cpp #include <regex> using namespace std; int main (int argc, char *argv[]) { string input; regex r(argv[1]); return 0; } Memory Resource Exhaustion cx@cx:~/REstd11/kozak5$ ./regr '((.*)$1{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100}{100})' expected: error_complexity CPU Resource Exhaustion cx@cx:~/REstd11/kozak5$ ./regr '((.*)((.*){10}(.*{2444444444,1})' # ps -aux cx 13836 99.9 5.8 666828 442248 pts/3 R+ cze23 577:46 ./regr ((.*)((.*){10}(.*{2444444444,1}) expected: error_space BR, Maksymilian Arciemowicz