[llvm-bugs] [Bug 41439] New: sparc64 segfault with function returning an empty struct

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 9 04:54:16 PDT 2019


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

            Bug ID: 41439
           Summary: sparc64 segfault with function returning an empty
                    struct
           Product: new-bugs
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: arnd at linaro.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Attempting to build a sparc64 linux kernel with clang, I ran into a
segmentation fault compiling mm/mmap.c. Reduced the test case to

struct vm_userfaultfd_ctx {
} fn1(struct vm_userfaultfd_ctx p1) {
        return p1;
}

$ clang-9 -cc1 mmap.c -triple sparc64-unknown-linux-gnu -S
Stack dump:
0.      Program arguments: clang-9 -cc1 mmap-f2e46f.c -triple
sparc64-unknown-linux-gnu -S 
1.      <eof> parser at end of file
2.      mmap-f2e46f.c:2:3: LLVM IR generation of declaration 'fn1'
3.      mmap-f2e46f.c:2:3: Generating code for declaration 'fn1'
 #0 0x00007f8be972b97f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x96d97f)
 #1 0x00007f8be9729dd0 llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x96bdd0)
 #2 0x00007f8be972bd88 (/usr/lib/x86_64-linux-gnu/libLLVM-9.so.1+0x96dd88)
 #3 0x00007f8bec979390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #4 0x000000000087982d (clang-9+0x87982d)
 #5 0x000000000076836a (clang-9+0x76836a)
 #6 0x000000000076984f (clang-9+0x76984f)
 #7 0x0000000000780b8b (clang-9+0x780b8b)
 #8 0x000000000077a90b (clang-9+0x77a90b)
 #9 0x0000000000783072 (clang-9+0x783072)
#10 0x0000000000d70c3f (clang-9+0xd70c3f)
#11 0x0000000000d6e572 (clang-9+0xd6e572)
#12 0x00000000011f2c33 (clang-9+0x11f2c33)
#13 0x0000000000af751f (clang-9+0xaf751f)
#14 0x0000000000ab7878 (clang-9+0xab7878)
#15 0x0000000000b7c895 (clang-9+0xb7c895)
#16 0x00000000006b140c (clang-9+0x6b140c)
#17 0x00000000006af97f (clang-9+0x6af97f)
#18 0x00007f8be8167830 __libc_start_main
/build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:325:0
#19 0x00000000006ad0d9 (clang-9+0x6ad0d9)
Segmentation fault (core dumped)

-- 
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/20190409/c6cfa1d3/attachment.html>


More information about the llvm-bugs mailing list