<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - sparc64 segfault with function returning an empty struct"
   href="https://bugs.llvm.org/show_bug.cgi?id=41439">41439</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>sparc64 segfault with function returning an empty struct
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>arnd@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>