Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

crash/hang with gcc 5+ -O2 and --enable-zsh-mem



I figured out this was because of -foptimize-strlen which somehow
causes calloc() to recurse infinitely and crash (with -O2 which also
enables -foptimize-sibling-calls it just hangs with no crash because
it doesn't consume extra stack, i presume). What I don't know is how
to fix it, or the causal relationship between strlen optimization and
calloc recursing infinitely. I've tried gcc 5.4, 6.2 and 6.4 with the
same result. Compiling only Src/mem.c with the problematic flag is
enough so it's something in there, but removing the one strlen() call
in the file has no effect.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author