lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

cometwk wrote:
> I find a Segmentation fault (core dumped) in Coco 1.1.6 release.
> OS: x86_64 GNU/Linux
> Coco 1.1.6 with Makefile -g ( not -O2) .
> but with -O2 work fine !

Ok, I can reproduce this here. Looks like GCC emits some pointless
frame-pointer saves on x64 if optimization is turned off. Even
though frame-pointers are not needed for debugging on x64.

Solution: compile with "-g -fomit-frame-pointer" or with "-g -O2".
Don't forget to add "-g" to MYLDFLAGS, too.

[Note that optimization and debugging are not exclusive options in
GCC. But some optimizations may spoil your debugging experience.
I usually use "-g -Os".]