[Bug libstdc++/84865] Regular expression regex_search falls into infinite loop causing segfault on crayxc machines
shaoqin2 at illinois dot edu
gcc-bugzilla@gcc.gnu.org
Thu Mar 15 00:05:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84865
--- Comment #11 from Bobby Lu <shaoqin2 at illinois dot edu> ---
(In reply to Tim Shen from comment #9)
> I see. Can you show the ulimit *stack* information? I believe it's -s.
>
> Also, try -O2 so that the functions are inlined.
>
> As for the stack overflow, it's a known issue. To workaround this, please
> set a bigger stack size.
$ ulimit -s
unlimited
-O2 resolves the issue. Thank you very much! So basically the issue can be
explained as recursive call not being optimized out. Thus stack overflows is
expected?
This explains everything actually. I was trying to control so many different
possible things and reproducing the bug. Removing random string parts would
resolve it issue sometime, which now is just due to string is shorter thus
stack needed is smaller?
More information about the Gcc-bugs
mailing list