[LLVMbugs] [Bug 23623] New: segfault in LLVMgold.so gold plugin on POWER7

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 21 13:16:41 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23623

            Bug ID: 23623
           Summary: segfault in LLVMgold.so gold plugin on POWER7
           Product: new-bugs
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ncm at cantrip.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Illustrated, a crash on a POWER7 in LLVMgold.so. gdb thinks the crash is in the
PrettyStackTraceEntry constructor.  

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)

$ uname -a
Linux cto-oss-p710-rhel7.vpc.internal 3.10.0-229.1.2.el7.ppc64 #1 SMP Fri Mar 6
17:16:30 EST 2015 ppc64 ppc64 ppc64 GNU/Linux

$ clang --version
clang version 3.7.0 (http://llvm.org/git/clang.git
aa730d58ae527a8fc48e2460b465259265d328eb) (http://llvm.org/git/llvm.git
4c8545c815522409c11e2349be6e8ccc68071f6b)
Target: powerpc64-unknown-linux-gnu
Thread model: posix

$ cat >/tmp/hello.c
#include <stdio.h>
int main() { puts("hello"); }
^D
$ ld --version
GNU gold (GNU Binutils 2.25.51.20150401) 1.11
...

$ clang -O  -flto -c /tmp/hello.c -o /tmp/hello.o

$ clang -v -O -flto /tmp/hello.o -o /tmp/hello
clang version 3.7.0 (http://llvm.org/git/clang.git
aa730d58ae527a8fc48e2460b465259265d328eb) (http://llvm.org/git/llvm.git
4c8545c815522409c11e2349be6e8ccc68071f6b)
Target: powerpc64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation:
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/ppc64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/ppc64-redhat-linux/4.8.3
Selected GCC installation:
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/bdedev/bdedev/bin/ld" --hash-style=gnu --no-add-needed --build-id
--eh-frame-hdr -m elf64ppc -dynamic-linker /lib64/ld64.so.1 -o /tmp/hello
/lib/../lib64/crt1.o /lib/../lib64/crti.o
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/crtbegin.o
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/../../../../lib64
-L/home/bdedev/bdedev/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/../../..
-L/home/bdedev/bdedev/bin/../lib -L/lib -L/usr/lib -plugin
/home/bdedev/bdedev/bin/../lib/LLVMgold.so -plugin-opt=mcpu=ppc64 /tmp/hello.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/crtend.o
/lib/../lib64/crtn.o
clang-3.7: error: unable to execute command: Segmentation fault
clang-3.7: error: linker command failed due to signal (use -v to see
invocation)

$ gdb `which ld`
GNU gdb (GDB) Red Hat Enterprise Lin 7.6.1-64.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/bdedev/bdedev/bin/ld...done.
(gdb) run --hash-style=gnu --no-add-needed --build-id --eh-frame-hdr -m
elf64ppc -dynamic-linker /lib64/ld64.so.1 -o /tmp/hello /lib/../lib64/crt1.o
/lib/../lib64/crti.o
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/crtbegin.o
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/../../../../lib64
-L/home/bdedev/bdedev/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/../../..
-L/home/bdedev/bdedev/bin/../lib -L/lib -L/usr/lib -plugin
/home/bdedev/bdedev/bin/../lib/LLVMgold.so -plugin-opt=mcpu=ppc64 /tmp/hello.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/crtend.o
/lib/../lib64/crtn.o
Starting program: /home/bdedev/bdedev/bin/ld --hash-style=gnu --no-add-needed
--build-id --eh-frame-hdr -m elf64ppc -dynamic-linker /lib64/ld64.so.1 -o
/tmp/hello /lib/../lib64/crt1.o /lib/../lib64/crti.o
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/crtbegin.o
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/../../../../lib64
-L/home/bdedev/bdedev/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64
-L/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/../../..
-L/home/bdedev/bdedev/bin/../lib -L/lib -L/usr/lib -plugin
/home/bdedev/bdedev/bin/../lib/LLVMgold.so -plugin-opt=mcpu=ppc64 /tmp/hello.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed
/home/bdedev/bdedev/bin/../lib/gcc/powerpc64-unknown-linux-gnu/6.0.0/crtend.o
/lib/../lib64/crtn.o
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: File "/home/bdedev/bdedev/lib64/libstdc++.so.6.0.22-gdb.py"
auto-loading has been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
To enable execution of this file add
    add-auto-load-safe-path
/home/bdedev/bdedev/lib64/libstdc++.so.6.0.22-gdb.py
line to your configuration file "/home/bdedev/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/home/bdedev/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"

Missing separate debuginfos, use: debuginfo-install glibc-2.17-78.el7.ppc64
---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
llvm::PrettyStackTraceEntry::PrettyStackTraceEntry (this=0x0)
    at
/home/bdedev/llvm-tot-workspace/llvm/lib/Support/PrettyStackTrace.cpp:114
114    PrettyStackTraceEntry::PrettyStackTraceEntry() {
(gdb) up
Killed

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150521/ccfdb500/attachment.html>


More information about the llvm-bugs mailing list