[llvm-bugs] [Bug 47961] New: unexpected clang crash in Function Pass Manager

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 25 01:59:14 PDT 2020


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

            Bug ID: 47961
           Summary: unexpected clang crash in Function Pass Manager
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: honggyu.kp at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

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 https://github.com/namhyung/uftrace
$ cd uftrace
$ sudo ./misc/install-deps.sh -y
$ CC=clang ./configure
$ make
  CC FPIC  libmcount/script-luajit.op
PLEASE submit a bug report to https://bugs.llvm.org/ 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 (https://github.com/llvm/llvm-project.git
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

-- 
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/20201025/5de3a380/attachment.html>


More information about the llvm-bugs mailing list