Revision: 3753 Author: lewis Date: 2016-12-20 17:03:04 -0800 (Tue, 20 Dec 2016) Log Message: ----------- Do not use -O3 optimization, -O2 is safer and works well.
gcc 4.9.2 gives crashes and heisenbugs with OSPP compiled with -O3.
Symptoms: (1 to: 10) collect: [ :e | (CommandShell new pipeline: 'ps > /dev/null | cat') output] ==> segfaults in some of the spawned child processes
This appears to be an actual compiler bug, although it goes away when print statements are added, so I cannot say for sure (and it is difficult to attach gdb to the newly spawned child process before it crashes). The bad behavior happens only with -O3 and there are no real performance benefits compared to -O2 (bytecodes faster, sends slower).
Modified Paths: -------------- trunk/platforms/unix/cmake/Makefile.example
Modified: trunk/platforms/unix/cmake/Makefile.example =================================================================== --- trunk/platforms/unix/cmake/Makefile.example 2016-12-11 16:49:35 UTC (rev 3752) +++ trunk/platforms/unix/cmake/Makefile.example 2016-12-21 01:03:04 UTC (rev 3753) @@ -9,7 +9,7 @@ # Assume platforms is ../platforms and src is ../src
# CFLAGS setting to pass to cmake configure. If undefined, use compiler defaults. -CFLAGS_PARAM="--CFLAGS='-O3 -D_FILE_OFFSET_BITS=64'" +CFLAGS_PARAM="--CFLAGS='-O2 -D_FILE_OFFSET_BITS=64'" #CFLAGS_PARAM="--CFLAGS='-O0 -g'"
squeakvm: build/squeakvm build64/squeakvm64