https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117394
Bug ID: 117394 Summary: evil regex causes a stack overflow and a crash Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: vincent.lebourlot at starqube dot com Target Milestone: --- Following code causes a crash when compiled with g++ 15 (gcc (GCC) 15.0.0 20240715 (experimental)) #include <regex> #include <string> int main(){ std::string s(15000,'a'); std::regex r3("a(\\r|.)*"); std::regex_match(s.begin(),s.end(),r3); return 0; }