[Bug libstdc++/93502] std::regex_match uses stack space proportional to input string length
avi@cloudius-systems.com
gcc-bugzilla@gcc.gnu.org
Mon Feb 10 13:51:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93502
--- Comment #6 from Avi Kivity <avi@cloudius-systems.com> ---
Even if match_results stores a copy of the matching string, it would be stored
on the heap and only pointers would be stored on the stack. So the stack
overflow comes from recursion, not because of the delegation to the overload
that creates the match_results.
More information about the Gcc-bugs
mailing list