<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 - unexpected clang crash in Function Pass Manager"
   href="https://bugs.llvm.org/show_bug.cgi?id=47961">47961</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>unexpected clang crash in Function Pass Manager
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>honggyu.kp@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I've seen some crashes when building uftrace, which is a C/C++/Rust function
tracing tool.

Here is the sequence to reproduce the bug.

$ git clone <a href="https://github.com/namhyung/uftrace">https://github.com/namhyung/uftrace</a>
$ cd uftrace
$ sudo ./misc/install-deps.sh -y
$ CC=clang ./configure
$ make
  CC FPIC  libmcount/script-luajit.op
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.
Stack dump:
0.      Program arguments:
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12
-D_GNU_SOURCE -iquote /home/honggyu/work/uftrace/git/uftrace -iquote
/home/honggyu/work/uftrace/git/uftrace -iquote
/home/honggyu/work/uftrace/git/uftrace/arch/x86_64 -Wdeclarat
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'/home/honggyu/work/uftrace/git/uftrace/utils/script-luajit.c'.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH
or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x2d)[0x1f4aefd]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm3sys17RunSignalHandlersEv+0x34)[0x1f48d14]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm3sys15CleanupOnSignalEm+0xb9)[0x1f48fa9]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12[0x1eba848]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7ff04dc59390]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm13PMDataManager26removeNotPreservedAnalysisEPNS_4PassE+0x12b)[0x189965b]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x4cf)[0x189ec0f]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x31)[0x18a0151]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x4e0)[0x189deb0]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12[0x21f5176]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10uniqu
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12[0x2e88ef9]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN5clang8ParseASTERNS_4SemaEbb+0x429)[0x3cc8259]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN5clang14FrontendAction7ExecuteEv+0xc9)[0x28117f9]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x1eb)[0x27c474b]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x9f8)[0x28e1ba8]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x5ed)[0x98ed2d]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12[0x98c65b]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12[0x267d535]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0x23)[0x1eba943]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12[0x267e015]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_+0x98)[0x2653818]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x106)[0x26541f6]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x89)[0x265e3c9]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(main+0x1b13)[0x90c9f3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff04c953830]
/home/honggyu/work/llvm/git/llvm-project/build.release/bin/clang-12(_start+0x29)[0x98c1f9]
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 12.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
f81f09ba8950a199af88e5a622155fb9801b11b7)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/honggyu/work/llvm/git/llvm-project/build.release/bin
clang-12: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/script-luajit-af2dd8.c
clang-12: note: diagnostic msg: /tmp/script-luajit-af2dd8.sh
clang-12: note: diagnostic msg:

********************
Makefile:244: recipe for target
'/home/honggyu/work/uftrace/git/uftrace/libmcount/script-luajit.op' failed
make: *** [/home/honggyu/work/uftrace/git/uftrace/libmcount/script-luajit.op]
Error 139</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>