[Bug lto/56877] New: When using LTO and linking statically, coredumps contain unusable stack trace
spatz at psybear dot com
gcc-bugzilla@gcc.gnu.org
Mon Apr 8 14:54:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56877
Bug #: 56877
Summary: When using LTO and linking statically, coredumps
contain unusable stack trace
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: spatz@psybear.com
Enabling LTO causes coredumps generated by programs which were statically
linked to have unusable backtraces.
Attached an example usecase:
Linking statically, no LTO:
$ gcc -static bt.c -o bt
$ ./bt
$ gdb bt core...
(gdb) bt
#0 0x0000000000440179 in raise ()
#1 0x0000000000405ea8 in abort ()
#2 0x0000000000401754 in __assert_fail_base ()
#3 0x00000000004017ae in __assert_fail ()
#4 0x0000000000400f94 in main ()
Linking statically, with LTO:
$ gcc -static -flto bt.c -o bt
$ ./bt
$ gdb bt core...
(gdb) bt
#0 0x000000000043f9c9 in raise ()
#1 0x0000000000405428 in abort ()
#2 0x0000000000000020 in ?? ()
#3 0x0000000000000000 in ?? ()
Adding -g or enabling other optimizations do not seem to change anything.
Versions used:
gcc (GCC) 4.8.0
GNU gdb (GDB) 7.5.1
More information about the Gcc-bugs
mailing list