Bug 12971 - Segmentation fault: 11 when using -flto=6 on FreeBSD 8.2
Summary: Segmentation fault: 11 when using -flto=6 on FreeBSD 8.2
Status: RESOLVED OBSOLETE
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 20:29 UTC by interfaSys sàrl
Modified: 2016-03-27 17:54 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description interfaSys sàrl 2011-07-07 20:29:58 UTC
I've managed to reproduce this with this one liner

int main(void){ return 0; }


Here are the commands:
# gcc46 -O2 -pipe -funroll-loops -ftracer -Ofast -floop-interchange -floop-strip-mine -floop-block -flto=6 -march=native -fno-strict-aliasing -msse -I/usr/local/include/vorbis -I/usr/local/include -c -o check_cc.o check_cc.c

# gcc46 -L/usr/local/lib -o check_cc check_cc.o -pthread


Hopefully this makes a helpful, valid test case
Comment 1 interfaSys sàrl 2011-07-07 20:48:24 UTC
This happens with the released version of binutils:
GNU gold (GNU Binutils 2.21.1) 1.11
Comment 2 interfaSys sàrl 2011-07-07 21:09:33 UTC
This command with less CFLAGS and without the vorbis dependency gives the same result:
# gcc46 -O2 -pipe -funroll-loops -flto=6 -march=native -fno-strict-aliasing -I/usr/local/include -c -o check_cc.o check_cc.c
Comment 3 interfaSys sàrl 2011-07-08 02:38:45 UTC
(gdb) bt full
#0  0x00000008006cea7d in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
No symbol table info available.
#1  0x00000008006cf75e in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
No symbol table info available.
#2  0x00000008006d03c7 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
No symbol table info available.
#3  0x00000008006d05c0 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
No symbol table info available.
#4  0x00000008006d5a59 in malloc () from /lib/libc.so.7
No symbol table info available.
#5  0x0000000800553eff in pthread_kill () from /lib/libthr.so.3
No symbol table info available.
#6  0x0000000800554883 in pthread_join () from /lib/libthr.so.3
No symbol table info available.
#7  0x000000080055707f in __error () from /lib/libthr.so.3
No symbol table info available.
#8  0x00007fffffffe500 in ?? ()
No symbol table info available.
#9  0x000000080052f0d0 in ?? () from /libexec/ld-elf.so.1
No symbol table info available.
#10 0x00000008004302c0 in ?? ()
No symbol table info available.
#11 0x000000080054cc9e in ?? () from /lib/libthr.so.3
No symbol table info available.
#12 0x000000080052f0d0 in ?? () from /libexec/ld-elf.so.1
No symbol table info available.
#13 0x0000000800408867 in dlsym () from /libexec/ld-elf.so.1
No symbol table info available.
#14 0x0000000800409c05 in dlopen () from /libexec/ld-elf.so.1
No symbol table info available.
#15 0x0000000800404759 in ?? () from /libexec/ld-elf.so.1
No symbol table info available.
#16 0x0000000000000000 in ?? ()
No symbol table info available.
#17 0x0000000000000000 in ?? ()
No symbol table info available.
#18 0x0000000000000000 in ?? ()
No symbol table info available.
#19 0x0000000000000001 in ?? ()
No symbol table info available.
Comment 4 interfaSys sàrl 2011-11-14 18:01:39 UTC
This is still an issue with today's snapshot.
Comment 5 Cary Coutant 2016-03-27 17:54:38 UTC
Seems to work now; closing.