[Bug libstdc++/86164] std::regex crashes when matching long lines
nilsgladitz at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 5 07:33:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86164
Nils Gladitz <nilsgladitz at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nilsgladitz at gmail dot com
--- Comment #6 from Nils Gladitz <nilsgladitz at gmail dot com> ---
I think I am hitting this issue somewhat earlier on an ARM system with a more
limited stack size.
Was able to reproduce it on Desktop x86_64 Linux with e.g.:
#include <regex>
int main()
{
std::regex_match(
std::string(2000, 'a'),
std::regex(".*")
);
}
$ ulimit -s 256 # 256kb stack; which is what have by default on the ARM system
$ g++ test.cpp -o regex_test
$ ./regex_test
Segmentation fault (core dumped)
More information about the Gcc-bugs
mailing list