[Bug libstdc++/68688] New: segmentation fault on regex matching long strings
kerukuro at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Dec 4 01:07:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68688
Bug ID: 68688
Summary: segmentation fault on regex matching long strings
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: kerukuro at gmail dot com
Target Milestone: ---
This program crashes when compiled by gcc 5.2.1 or 5.1.1.
Works fine and matches the complete string when compiled by MSVC++2015.
#include <regex>
#include <string>
using namespace std;
int main()
{
regex eq(R"(\w+)");
string line(25500, 'a');
smatch sm;
regex_match(line, sm, eq);
return 0;
}
More information about the Gcc-bugs
mailing list