[llvm-bugs] [Bug 31224] New: lld produces broken executable with CUDA

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 1 06:30:18 PST 2016


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

            Bug ID: 31224
           Summary: lld produces broken executable with CUDA
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ismail at i10z.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17694
  --> https://llvm.org/bugs/attachment.cgi?id=17694&action=edit
Crashing executable

havana ~/Downloads > clang-4.0 -v
openSUSE Linux clang version 4.0.0 (trunk 288322) (based on LLVM 4.0.0svn)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /suse/idoenmez/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/6
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/6
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

> /opt/clang/bin/clang++ --cuda-gpu-arch=sm_50 --cuda-path=/havana/cuda-8.0 axpy.cu -fuse-ld=lld -L/havana/cuda-8.0/lib64 -lcudart_static -ldl -lrt -pthread -Wl,-rpath,/opt/clang/lib64 -Wl,-rpath,/havana/cuda-8.0/lib64

> ./a.out
zsh: segmentation fault (core dumped)  ./a.out

Same works with gold (or bfd too):

> /opt/clang/bin/clang++ --cuda-gpu-arch=sm_50 --cuda-path=/havana/cuda-8.0 axpy.cu -fuse-ld=gold -L/havana/cuda-8.0/lib64 -lcudart_static -ldl -lrt -pthread -Wl,-rpath,/opt/clang/lib64 -Wl,-rpath,/havana/cuda-8.0/lib64
> ./a.out             
y[0] = 2
y[1] = 4
y[2] = 6
y[3] = 8

Attached is the produced binary.

-- 
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/20161201/1e5eb069/attachment.html>


More information about the llvm-bugs mailing list