[llvm-bugs] [Bug 38122] New: Current clang segfaults while trying to build itself

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 10 10:21:42 PDT 2018


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

            Bug ID: 38122
           Summary: Current clang segfaults while trying to build itself
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bero at linaro.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 20546
  --> https://bugs.llvm.org/attachment.cgi?id=20546&action=edit
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
(https://android.googlesource.com/toolchain/clang
695bff9aae9838e22bfe52909106a76e09782fca) (https://git.llvm.org/git/llvm
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
https://bugs.llvm.org/ 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.)

-- 
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/20180710/193b3378/attachment.html>


More information about the llvm-bugs mailing list