[llvm-bugs] [Bug 36485] New: Crash when compiling LLVM IR with tons of musttail calls

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 22 22:11:27 PST 2018


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

            Bug ID: 36485
           Summary: Crash when compiling LLVM IR with tons of musttail
                    calls
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: fedor at indutny.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19932
  --> https://bugs.llvm.org/attachment.cgi?id=19932&action=edit
LLVM IR file

0  clang-5.0                0x00000001075c31e7
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  clang-5.0                0x00000001075c26ea llvm::sys::RunSignalHandlers() +
83
2  clang-5.0                0x00000001075c360e SignalHandler(int) + 239
3  libsystem_platform.dylib 0x00007fff784cef5a _sigtramp + 26
4  libsystem_platform.dylib 000000000000000000 _sigtramp + 2276659392
5  clang-5.0                0x0000000107553049
getCommonReturnValue(llvm::ReturnInst*, llvm::CallInst*) + 120
6  clang-5.0                0x000000010755280a
eliminateRecursiveTailCall(llvm::CallInst*, llvm::ReturnInst*,
llvm::BasicBlock*&, bool&, llvm::SmallVectorImpl<llvm::PHINode*>&,
llvm::AAResults*) + 735
7  clang-5.0                0x00000001075517b6
eliminateTailRecursion(llvm::Function&, llvm::TargetTransformInfo const*,
llvm::AAResults*) + 2287
8  clang-5.0                0x000000010729c2b4
llvm::FPPassManager::runOnFunction(llvm::Function&) + 276
9  clang-5.0                0x0000000106f7cb71 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) + 661
10 clang-5.0                0x000000010729c7a5
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 579
11 clang-5.0                0x00000001076e9df8
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions
const&, clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*,
clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 9714
12 clang-5.0                0x000000010781fe97
clang::CodeGenAction::ExecuteAction() + 973
13 clang-5.0                0x00000001079986db clang::FrontendAction::Execute()
+ 73
14 clang-5.0                0x000000010796980b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 625
15 clang-5.0                0x00000001079c5a66
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2438
16 clang-5.0                0x00000001066f0411 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1169
17 clang-5.0                0x00000001066eee70 main + 8127
18 libdyld.dylib            0x00007fff7824e145 start + 1
19 libdyld.dylib            0x0000000000000033 start + 2279284463
Stack dump:
0.      Program arguments: /usr/local/Cellar/llvm/5.0.1/bin/clang-5.0 -cc1
-triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -emit-obj -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name otherwise-skip.ll
-mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 305
-dwarf-column-info -debugger-tuning=lldb -resource-dir
/usr/local/Cellar/llvm/5.0.1/lib/clang/5.0.1 -Os -fdebug-compilation-dir
/Users/findutnyy/Code/indutny/llparse -ferror-limit 19 -fmessage-length 178
-stack-protector 1 -fblocks -fobjc-runtime=macosx-10.13.0
-fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -o
/var/folders/7l/34nn743x7hv3pwhp4pjplxxc3kfgkf/T/otherwise-skip-5b8771.o -x ir
test/tmp/otherwise-skip.ll
1.      Per-module optimization passes
2.      Running pass 'CallGraph Pass Manager' on module
'test/tmp/otherwise-skip.ll'.
3.      Running pass 'Tail Call Elimination' on function '@llparse__n_start'
clang-5.0: error: unable to execute command: Segmentation fault: 11
clang-5.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

-- 
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/20180223/c8aa5fa5/attachment-0001.html>


More information about the llvm-bugs mailing list