Skip to content

error: unable to execute command: Segmentation fault (core dumped) #114454

@Chobbes

Description

@Chobbes

Running clang broken4.ll, the file inside this attached tarball, yields a segfault:

broken4.tar.gz

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /nix/store/m4yb6xs0g07l0bc3c4i0klgv5lgz7g6s-clang-19.1.1/bin/clang-19 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name broken4.ll -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/calvin/git/vellvm-worktrees/dev/src -fcoverage-compilation-dir=/home/calvin/git/vellvm-worktrees/dev/src -nostdsysteminc -resource-dir /nix/store/5j2f6adr7awqag8c7cv6q4px0lz477gc-clang-wrapper-19.1.1/resource-root -O2 -Wformat -Wformat-security -Werror=format-security -ferror-limit 19 -fzero-call-used-regs=used-gpr -fwrapv -stack-protector 2 -stack-protector-buffer-size 4 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/nix-shell.aPagw4/broken4-942c53.o -x ir broken4.ll
1.      Code generation
2.      Running pass 'Function Pass Manager' on module 'broken4.ll'.
3.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
 #0 0x00007f4208fe38fe llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0xfe38fe)
 #1 0x00007f4208fe0d8b SignalHandler(int) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0xfe0d8b)
 #2 0x00007f4207a47620 __restore_rt (/nix/store/sl141d1g77wvhr050ah87lcyz2czdxa3-glibc-2.40-36/lib/libc.so.6+0x40620)
 #3 0x00007f420916e859 llvm::ExtractValueInst::getIndexedType(llvm::Type*, llvm::ArrayRef<unsigned int>) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x116e859)
 #4 0x00007f42092d1bb2 llvm::returnTypeIsEligibleForTailCall(llvm::Function const*, llvm::Instruction const*, llvm::ReturnInst const*, llvm::TargetLoweringBase const&, bool) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x12d1bb2)
 #5 0x00007f4209b1682c llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, bool, llvm::BasicBlock const*, llvm::TargetLowering::PtrAuthInfo const*) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x1b1682c)
 #6 0x00007f4209b41f16 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x1b41f16)
 #7 0x00007f4209b42678 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x1b42678)
 #8 0x00007f4209bbee80 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, true>, llvm::ilist_iterator_w_bits<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void, true, llvm::BasicBlock>, false, true>, bool&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x1bbee80)
 #9 0x00007f4209bc01db llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x1bc01db)
#10 0x00007f4209bc20a3 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x1bc20a3)
#11 0x00007f4209bb1829 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x1bb1829)
#12 0x00007f420953658c llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x153658c)
#13 0x00007f420919b889 llvm::FPPassManager::runOnFunction(llvm::Function&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x119b889)
#14 0x00007f420919bc0c llvm::FPPassManager::runOnModule(llvm::Module&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x119bc0c)
#15 0x00007f420919c5fb llvm::legacy::PassManagerImpl::run(llvm::Module&) (/nix/store/a46srmpfz5vd4cj2z5z1h8r79f0mwz15-llvm-19.1.1-lib/lib/libLLVM.so.19.1+0x119c5fb)
#16 0x00007f42133959ed (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/nix/store/350qc4bvz2p4kmkqy6a9ahrq53jyxayx-clang-19.1.1-lib/lib/libclang-cpp.so.19.1+0x21959ed)
#17 0x00007f421339601b clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/nix/store/350qc4bvz2p4kmkqy6a9ahrq53jyxayx-clang-19.1.1-lib/lib/libclang-cpp.so.19.1+0x219601b)
#18 0x00007f4213845fbf clang::CodeGenAction::ExecuteAction() (/nix/store/350qc4bvz2p4kmkqy6a9ahrq53jyxayx-clang-19.1.1-lib/lib/libclang-cpp.so.19.1+0x2645fbf)
#19 0x00007f42142ad499 clang::FrontendAction::Execute() (/nix/store/350qc4bvz2p4kmkqy6a9ahrq53jyxayx-clang-19.1.1-lib/lib/libclang-cpp.so.19.1+0x30ad499)
#20 0x00007f42142295fb clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/nix/store/350qc4bvz2p4kmkqy6a9ahrq53jyxayx-clang-19.1.1-lib/lib/libclang-cpp.so.19.1+0x30295fb)
#21 0x00007f4214341c5b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/nix/store/350qc4bvz2p4kmkqy6a9ahrq53jyxayx-clang-19.1.1-lib/lib/libclang-cpp.so.19.1+0x3141c5b)
#22 0x0000000000413a51 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/nix/store/m4yb6xs0g07l0bc3c4i0klgv5lgz7g6s-clang-19.1.1/bin/clang-19+0x413a51)
#23 0x000000000040d60a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) (/nix/store/m4yb6xs0g07l0bc3c4i0klgv5lgz7g6s-clang-19.1.1/bin/clang-19+0x40d60a)
#24 0x000000000041005d clang_main(int, char**, llvm::ToolContext const&) (/nix/store/m4yb6xs0g07l0bc3c4i0klgv5lgz7g6s-clang-19.1.1/bin/clang-19+0x41005d)
#25 0x000000000040cff6 main (/nix/store/m4yb6xs0g07l0bc3c4i0klgv5lgz7g6s-clang-19.1.1/bin/clang-19+0x40cff6)
#26 0x00007f4207a3127e __libc_start_call_main (/nix/store/sl141d1g77wvhr050ah87lcyz2czdxa3-glibc-2.40-36/lib/libc.so.6+0x2a27e)
#27 0x00007f4207a31339 __libc_start_main@GLIBC_2.2.5 (/nix/store/sl141d1g77wvhr050ah87lcyz2czdxa3-glibc-2.40-36/lib/libc.so.6+0x2a339)
#28 0x000000000040d055 _start (/nix/store/m4yb6xs0g07l0bc3c4i0klgv5lgz7g6s-clang-19.1.1/bin/clang-19+0x40d055)
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 19.1.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/m4yb6xs0g07l0bc3c4i0klgv5lgz7g6s-clang-19.1.1/bin
clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]llvm:SelectionDAGSelectionDAGISel as well

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions