llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.9k stars 11.51k forks source link

LLVM 11 crashed at llvm::DataLayout::getAlignment #49741

Closed llvmbot closed 1 year ago

llvmbot commented 3 years ago
Bugzilla Link 50397
Version 11.0
OS Linux
Attachments bitcode
Reporter LLVM Bugzilla Contributor

Extended Description

$ bugpoint target/bpf/programs/l4core/l4core-3767c1b598866e01.bc.opt --llc-safe Read input file : 'target/bpf/programs/l4core/l4core-3767c1b598866e01.bc.opt' *** All input ok Initializing execution environment: Found llc: /usr/lib/llvm-11/bin/llc Running the code generator to test for a crash: Error running tool: /usr/lib/llvm-11/bin/llc -o bugpoint-test-program-e922842.bc-05dd2be.llc.s bugpoint-test-program-e922842.bc PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump:

  1. Program arguments: /usr/lib/llvm-11/bin/llc -o bugpoint-test-program-e922842.bc-05dd2be.llc.s bugpoint-test-program-e922842.bc
  2. Running pass 'Function Pass Manager' on module 'bugpoint-test-program-e922842.bc'.
  3. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN6l4core4pckt10Descriptor11parse_proto17hbb1089830b7d0853E'

    ​0 0x00007f958c69a51f llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xaa651f)

    ​1 0x00007f958c698880 llvm::sys::RunSignalHandlers() (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xaa4880)

    ​2 0x00007f958c69a9f5 (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xaa69f5)

    ​3 0x00007f958bbe6420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x15420)

    ​4 0x00007f958c731030 llvm::DataLayout::getAlignment(llvm::Type*, bool) const (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb3d030)

    ​5 0x00007f958cc88565 llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1094565)

    ​6 0x00007f958cca752c llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&, llvm::BasicBlock const*) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x10b352c)

    ​7 0x00007f958cc90ffa llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, llvm::BasicBlock const*) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x109cffa)

    ​8 0x00007f958cc7bce9 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1087ce9)

    ​9 0x00007f958cc70979 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x107c979)

    ​10 0x00007f958ccfbcc9 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, bool&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1107cc9)

    ​11 0x00007f958ccfb612 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1107612)

    ​12 0x00007f958ccf9311 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1105311)

    ​13 0x00007f958e696205 (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x2aa2205)

    ​14 0x00007f958c96c4ae llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xd784ae)

    ​15 0x00007f958c7a9689 llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbb5689)

    ​16 0x00007f958c7aec33 llvm::FPPassManager::runOnModule(llvm::Module&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbbac33)

    ​17 0x00007f958c7a9ca0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbb5ca0)

    ​18 0x000000000040d792 main (/usr/lib/llvm-11/bin/llc+0x40d792)

    ​19 0x00007f958b6bb0b3 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b3)

    ​20 0x000000000040b0ce _start (/usr/lib/llvm-11/bin/llc+0x40b0ce)

    *** Debugging code generator crash!

Checking to see if we can delete global inits:

*** Able to remove all global initializers!

*** Attempting to reduce the number of functions in the testcase Checking for crash with only these functions: _ZN6l4core4pckt10Descriptor11parse_proto17hbb1089830b7d0853E memcpy memmove memset bcmp outer_l4core_forward: Checking for crash with only these functions: _ZN6l4core4pckt10Descriptor11parse_proto17hbb1089830b7d0853E bcmp outer_l4core_forward: Checking for crash with only these functions: outer_l4core_forward _ZN6l4core4pckt10Descriptor11parse_proto17hbb1089830b7d0853E: Checking for crash with only these functions: _ZN6l4core4pckt10Descriptor11parse_proto17hbb1089830b7d0853E: Emitted bitcode to 'bugpoint-reduced-function.bc'

*** Attempting to reduce the number of function attributes in the testcase

Checking for crash with changing conditionals to always jump to true: start bb2 bb2.i.i.i bb5.i.i.i bb5 bb8.i194 bb2.i.i.i103.i bb5.i.i.i106.i bb11.i bb17.i197... <30 total>: Checking for crash with changing conditionals to always jump to true: bb11 bb5.i.i.i.i201 bb23 bb2.i.i.i149 bb14 bb5.i.i.i107.i bb8.i bb17.i bb2.i.i.i.i199 bb5.i.i.i170... <15 total>: Checking for crash with changing conditionals to always jump to true: bb2.i.i.i149 bb5.i.i.i152 bb14 bb11 bb2.i.i.i167: Checking for crash with changing conditionals to always jump to true: bb11 bb2.i.i.i167: Checking for crash with changing conditionals to always jump to true: bb2.i.i.i167: Checking for crash with changing conditionals to always jump to false: bb2.i.i.i167: Emitted bitcode to 'bugpoint-reduced-conditionals.bc' Checking for crash with only these blocks: start bb2 bb11 bb2.i.i.i167 bb5.i.i.i170 bb20 bb29: Checking for crash with only these blocks: bb2.i.i.i167 bb5.i.i.i170 bb20 bb29: Checking for crash with only these blocks: start bb2 bb11: Checking for crash with only these blocks: bb2 bb11: Checking for crash with only these blocks: start: Emitted bitcode to 'bugpoint-reduced-blocks.bc' Checking for crash with CFG simplifying: start bb2 bb11 bb20 bb29: Checking for crash with CFG simplifying: bb11 bb20 bb29: Checking for crash with CFG simplifying: bb20 bb29: Checking for crash with CFG simplifying: bb29: Emitted bitcode to 'bugpoint-reduced-simplifycfg.bc' Checking for crash with only 22 instructions: Checking for crash with only 11 instructions: Checking for crash with only 6 instructions: Checking for crash with only 5 instructions: Checking for crash with only 3 instructions: Checking for crash with only 2 instructions: Checking for crash with only 1 instruction: Checking for crash with only 1 instruction: *** Attempting to reduce testcase by deleting instructions: Simplification Level #​1 Checking instruction: tail call void @​llvm.experimental.noalias.scope.decl(metadata !​4) *** Attempting to reduce testcase by deleting instructions: Simplification Level #​0 Checking instruction: tail call void @​llvm.experimental.noalias.scope.decl(metadata !​4) Checking for crash with metadata retained from 6 instructions: Checking for crash with metadata retained from 3 instructions: Checking for crash with metadata retained from 2 instructions: Checking for crash with metadata retained from 1 instruction: Emitted bitcode to 'bugpoint-reduced-instructions.bc' *** Attempting to strip the debug info: *** Attempting to strip the debug type info: *** Attempting to remove named metadata: Checking for crash with only these named metadata nodes: llvm.module.flags: Checking for crash with only 4 named metadata operands: Checking for crash with only 2 named metadata operands: Checking for crash with only 1 named metadata operand: Emitted bitcode to 'bugpoint-reduced-named-md.bc' *** Attempting to perform final cleanups: Emitted bitcode to 'bugpoint-reduced-simplified.bc'
arsenm commented 1 year ago

Doesn't reproduce on main