<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 - Current clang segfaults while trying to build itself"
   href="https://bugs.llvm.org/show_bug.cgi?id=38122">38122</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Current clang segfaults while trying to build itself
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20546" name="attach_20546" title="GlobalOpt-e07546.cpp (xz compressed to fit size limit)">attachment 20546</a> <a href="attachment.cgi?id=20546&action=edit" title="GlobalOpt-e07546.cpp (xz compressed to fit size limit)">[details]</a></span>
GlobalOpt-e07546.cpp (xz compressed to fit size limit)

This happens when using the Android toolchain builder on current llvm/clang
(the builder essentially builds a stage1 compiler for the host it's running on,
then uses that compiler to build a stage2 compiler in Android config):

1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module
'/home/bernhard.rosenkranzer/upstream-toolchain/toolchain/llvm/lib/Transforms/IPO/GlobalOpt.cpp'.
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7[0x177bda4]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x1779c9e]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7[0x177bf62]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f8c2a937330]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN4llvm12scc_iteratorIPNS_9CallGraphENS_11GraphTraitsIS2_EEE11DFSVisitOneEPNS_13CallGraphNodeE+0x18c)[0xe72a1c]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7[0x10fff9c]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x347)[0x1307687]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionENSt3__110unique_ptrINSE_17raw_pwrite_streamENSL_14default_deleteISN_EEEE+0x4583)[0x18ee0b3]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7[0x1ec87af]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN5clang8ParseASTERNS_4SemaEbb+0x214)[0x22d2f04]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN5clang14FrontendAction7ExecuteEv+0x7b)[0x1e32d2b]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x4c8)[0x1da6fc8]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x6d4)[0x1ec2fb4]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x471)[0xc23b71]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7(main+0xa19)[0xc1fd69]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f8c29a3ef45]
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin/clang-7[0xc1f029]
clang-7: error: unable to execute command: Segmentation fault (core dumped)
clang-7: error: clang frontend command failed due to signal (use -v to see
invocation)
Android (dev based on r328903) clang version 7.0.2
(<a href="https://android.googlesource.com/toolchain/clang">https://android.googlesource.com/toolchain/clang</a>
695bff9aae9838e22bfe52909106a76e09782fca) (<a href="https://git.llvm.org/git/llvm">https://git.llvm.org/git/llvm</a>
321acf353eee88d5e2a2fa6999c57634b9779479) (based on LLVM 7.0.2svn)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/bernhard.rosenkranzer/upstream-toolchain/out/stage1-install/bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-7: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7: note: diagnostic msg: /tmp/GlobalOpt-e07546.cpp
clang-7: note: diagnostic msg: /tmp/GlobalOpt-e07546.sh
clang-7: note: diagnostic msg: 

********************

(The odd "7.0.2" version and the "based on 328903" claim are relics from the
build scripts; actual source I'm building is 336677.)</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>