https://llvm.org/bugs/show_bug.cgi?id=31114
Bug ID: 31114 Summary: Clang crashed when trying to optimize bitcode file on -O3 Product: clang Version: 3.9 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: pe...@trailofbits.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Note: It took a *LONG* time before it crashed. pag@sloth:~/Code/remill/build$ clang-3.9 -O3 -emit-llvm -c /tmp/nginx_core.bc -o /tmp/nginx_core_opt.bc warning: overriding the module target triple with x86_64-unknown-linux-gnu [-Woverride-module] terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc 0 clang-3.9 0x00000000028132ea llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 72 1 clang-3.9 0x0000000002813689 2 clang-3.9 0x000000000281162d llvm::sys::RunSignalHandlers() + 159 3 clang-3.9 0x0000000002812a51 4 libpthread.so.0 0x00007f45317253e0 5 libc.so.6 0x00007f4530498428 gsignal + 56 6 libc.so.6 0x00007f453049a02a abort + 362 7 libstdc++.so.6 0x00007f4530dda84d __gnu_cxx::__verbose_terminate_handler() + 365 8 libstdc++.so.6 0x00007f4530dd86b6 9 libstdc++.so.6 0x00007f4530dd8701 10 libstdc++.so.6 0x00007f4530dd8919 11 libstdc++.so.6 0x00007f4530dd8ebc 12 clang-3.9 0x0000000001e24e9a 13 clang-3.9 0x0000000001e27fcd 14 clang-3.9 0x0000000001e27720 15 clang-3.9 0x0000000001e26a8d 16 clang-3.9 0x0000000001e25101 17 clang-3.9 0x0000000001e22c29 18 clang-3.9 0x0000000001e1fd02 19 clang-3.9 0x0000000001e1c4f5 20 clang-3.9 0x000000000284afed 21 clang-3.9 0x000000000284ba08 llvm::CloneAndPruneIntoFromInst(llvm::Function*, llvm::Function const*, llvm::Instruction const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&, bool, llvm::SmallVectorImpl<llvm::ReturnInst*>&, char const*, llvm::ClonedCodeInfo*) + 753 22 clang-3.9 0x000000000284d00d llvm::CloneAndPruneFunctionInto(llvm::Function*, llvm::Function const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&, bool, llvm::SmallVectorImpl<llvm::ReturnInst*>&, char const*, llvm::ClonedCodeInfo*, llvm::Instruction*) + 103 23 clang-3.9 0x00000000028699f1 llvm::InlineFunction(llvm::CallSite, llvm::InlineFunctionInfo&, llvm::AAResults*, bool) + 2429 24 clang-3.9 0x0000000002302945 25 clang-3.9 0x0000000002304e65 llvm::Inliner::inlineCalls(llvm::CallGraphSCC&) + 3599 26 clang-3.9 0x0000000002304053 llvm::Inliner::runOnSCC(llvm::CallGraphSCC&) + 65 27 clang-3.9 0x0000000002302618 28 clang-3.9 0x000000000376d5bc 29 clang-3.9 0x000000000376e96f 30 clang-3.9 0x000000000376ecd8 31 clang-3.9 0x00000000021d0b59 32 clang-3.9 0x00000000021d12a3 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 271 33 clang-3.9 0x00000000021d14af llvm::legacy::PassManager::run(llvm::Module&) + 39 34 clang-3.9 0x0000000002ae012a 35 clang-3.9 0x0000000002ae02fd clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) + 196 36 clang-3.9 0x000000000356b15f clang::CodeGenAction::ExecuteAction() + 2035 37 clang-3.9 0x00000000030a6656 clang::FrontendAction::Execute() + 150 38 clang-3.9 0x0000000003045d04 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1200 39 clang-3.9 0x00000000031f255d clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1396 40 clang-3.9 0x00000000016fb953 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1069 41 clang-3.9 0x00000000016ee392 42 clang-3.9 0x00000000016eeea8 main + 2378 43 libc.so.6 0x00007f4530483830 __libc_start_main + 240 44 clang-3.9 0x00000000016ebac9 _start + 41 Stack dump: 0. Program arguments: /usr/local/bin/clang-3.9 -cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -emit-llvm-uselists -disable-free -main-file-name nginx_core.bc -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-file /tmp/nginx_core_opt.bc -resource-dir /usr/local/bin/../lib/clang/3.9.0 -O3 -fdebug-compilation-dir /home/pag/Code/remill/build -ferror-limit 19 -fmessage-length 154 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/nginx_core_opt.bc -x ir /tmp/nginx_core.bc 1. Per-module optimization passes 2. Running pass 'CallGraph Pass Manager' on module '/tmp/nginx_core.bc'. clang-3.9: error: unable to execute command: Aborted clang-3.9: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.9.0 (tags/RELEASE_390/final) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/bin clang-3.9: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-3.9: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs