This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/86164] std::regex crashes when matching long lines
- From: "nilsgladitz at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Dec 2018 07:33:02 +0000
- Subject: [Bug libstdc++/86164] std::regex crashes when matching long lines
- Auto-submitted: auto-generated
- References: <bug-86164-4@http.gcc.gnu.org/bugzilla/>
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)