[LLVMbugs] [Bug 12622] New: gold crashes during final Firefox's libxul link
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 22 10:53:14 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12622
Bug #: 12622
Summary: gold crashes during final Firefox's libxul link
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: gold-plugin
AssignedTo: unassignedbugs at nondot.org
ReportedBy: markus at trippelsdorf.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8424
--> http://llvm.org/bugs/attachment.cgi?id=8424
testcase
Trying to build Firefox with -O4 and clang results in the following crash:
...
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: multiple definition
of '0A�:'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../xpcom/r
eflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: previous definition here
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: multiple definition
of '�:'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../xpcom/r
eflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: previous definition here
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: multiple definition
of '�:'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../xpcom/r
eflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: previous definition here
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: multiple definition
of '�:'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../xpcom/r
eflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: previous definition here
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: multiple definition
of '�:'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../xpcom/r
eflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: previous definition here
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: multiple definition
of '1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../xpcom/r
eflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: previous definition here
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: multiple definition
of '1'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/mozilla-central/moz-build-dir/toolkit/library/../../xpcom/r
eflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.o: previous definition here
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7ead740 (LWP 27539)]
strlen () at ../sysdeps/x86_64/strlen.S:31
31 movdqu (%rdi), %xmm1
(gdb) bt
#0 strlen () at ../sysdeps/x86_64/strlen.S:31
#1 0x00000000005628fe in string_length<char> (p=<optimized out>) at
/var/tmp/portage/sys-devel/binutils-9999/work/binutils/gold/stringpool.h:54
#2 gold::Stringpool_template<char>::add (this=0x7fffffff7fc0, s=<optimized
out>, copy=<optimized out>, pkey=0x7fffffff78a8)
at
/var/tmp/portage/sys-devel/binutils-9999/work/binutils/gold/stringpool.cc:210
#3 0x0000000000571ee1 in gold::Symbol_table::add_from_pluginobj<64, false>
(this=0x7fffffff7f60, obj=0x3afaef90, name=0x0, ver=0x0,
sym=0x7fffffff7940) at
/var/tmp/portage/sys-devel/binutils-9999/work/binutils/gold/symtab.cc:1340
#4 0x0000000000534f80 in gold::Sized_pluginobj<64, false>::do_add_symbols
(this=0x3afaef90, symtab=0x7fffffff7f60, layout=0x7fffffff81c0)
at
/var/tmp/portage/sys-devel/binutils-9999/work/binutils/gold/plugin.cc:1074
#5 0x0000000000577e35 in gold::Workqueue::find_and_run_task
(this=this at entry=0x7fffffff7c10, thread_number=thread_number at entry=0)
at
/var/tmp/portage/sys-devel/binutils-9999/work/binutils/gold/workqueue.cc:319
#6 0x000000000057818a in gold::Workqueue::process (this=0x7fffffff7c10,
thread_number=0)
at
/var/tmp/portage/sys-devel/binutils-9999/work/binutils/gold/workqueue.cc:495
#7 0x0000000000410d92 in main (argc=109, argv=0x7fffffffdb68) at
/var/tmp/portage/sys-devel/binutils-9999/work/binutils/gold/main.cc:252
(gdb)
Looks like gold crashes because the clang plugin sends garbage to it.
I've reduced this to the attached testcase:
markus at x4 /tmp % clang++ -O4 test.ii
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/test-RM6ONc.o: multiple definition of '!'
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/test-RM6ONc.o: previous definition here
clang: error: unable to execute command: Segmentation fault
clang: error: linker command failed due to signal (use -v to see invocation)
markus at x4 /tmp % clang -v
clang version 3.2 (trunk)
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list