llvm / llvm-project

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

Crash in Optimize for code generation #8526

Closed pwo closed 2 years ago

pwo commented 14 years ago
Bugzilla Link 8154
Resolution FIXED
Resolved on Sep 16, 2010 14:09
Version trunk
OS FreeBSD
Attachments bugpoint-reduced-simplified.bc, valgrind.log
CC @ismail

Extended Description

llvm r113919.

Stack dump:

  1. Program arguments: llc bugpoint-reduced-simplified.bc
  2. Running pass 'Function Pass Manager' on module 'bugpoint-reduced-simplified.bc'.
  3. Running pass 'Optimize for code generation' on function '@_sem_timedwait' Segmentation fault
llvmbot commented 2 years ago

mentioned in issue llvm/llvm-bugzilla-archive#8163

llvmbot commented 14 years ago

Bug llvm/llvm-bugzilla-archive#8163 has been marked as a duplicate of this bug.

ismail commented 14 years ago

This possibly fixed llvm/llvm-bugzilla-archive#8163 too.

llvmbot commented 14 years ago

Fixed in 114104.

llvmbot commented 14 years ago

Use after free:

==16958== Invalid read of size 8 ==16958== at 0xBA74F3: (anonymous namespace)::CodeGenPrepare::OptimizeInlineAsmInst(llvm::Instruction, llvm::CallSite, llvm::DenseMap<llvm::Value, llvm::Value, llvm::DenseMapInfo<llvm::Value>, llvm::DenseMapInfo<llvm::Value> >&) (Type.h:507) ==16958== by 0xBA8C86: (anonymous namespace)::CodeGenPrepare::OptimizeBlock(llvm::BasicBlock&) (CodeGenPrepare.cpp:947) ==16958== by 0xBA96CA: (anonymous namespace)::CodeGenPrepare::runOnFunction(llvm::Function&) (CodeGenPrepare.cpp:123) ==16958== by 0xD4C706: llvm::FPPassManager::runOnFunction(llvm::Function&) (PassManager.cpp:1443) ==16958== by 0xD4C7CA: llvm::FPPassManager::runOnModule(llvm::Module&) (PassManager.cpp:1463) ==16958== by 0xD4C296: llvm::MPPassManager::runOnModule(llvm::Module&) (PassManager.cpp:1517) ==16958== by 0xD4C3E6: llvm::PassManagerImpl::run(llvm::Module&) (PassManager.cpp:1598) ==16958== by 0x53016C: main (llc.cpp:323) ==16958== Address 0x5da5830 is 112 bytes inside a block of size 184 free'd ==16958== at 0x4C27A83: operator delete(void) (vg_replace_malloc.c:387) ==16958== by 0xBEF817: llvm::RecursivelyDeleteTriviallyDeadInstructions(llvm::Value) (Local.cpp:257) ==16958== by 0xBA6EAE: _ZN12_GLOBAL__N_114CodeGenPrepare18OptimizeMemoryInstEPN4llvm11InstructionEPNS1_5ValueEPKNS1_4TypeERNS1_8DenseMapIS5_S5_NS1_12DenseMapInfoIS5_EESB_EE.clone.451 (CodeGenPrepare.cpp:725) ==16958== by 0xBA757E: (anonymous namespace)::CodeGenPrepare::OptimizeInlineAsmInst(llvm::Instruction, llvm::CallSite, llvm::DenseMap<llvm::Value, llvm::Value, llvm::DenseMapInfo<llvm::Value>, llvm::DenseMapInfo<llvm::Value> >&) (CodeGenPrepare.cpp:750) ==16958== by 0xBA8C86: (anonymous namespace)::CodeGenPrepare::OptimizeBlock(llvm::BasicBlock&) (CodeGenPrepare.cpp:947) ==16958== by 0xBA96CA: (anonymous namespace)::CodeGenPrepare::runOnFunction(llvm::Function&) (CodeGenPrepare.cpp:123) ==16958== by 0xD4C706: llvm::FPPassManager::runOnFunction(llvm::Function&) (PassManager.cpp:1443) ==16958== by 0xD4C7CA: llvm::FPPassManager::runOnModule(llvm::Module&) (PassManager.cpp:1463) ==16958== by 0xD4C296: llvm::MPPassManager::runOnModule(llvm::Module&) (PassManager.cpp:1517) ==16958== by 0xD4C3E6: llvm::PassManagerImpl::run(llvm::Module&) (PassManager.cpp:1598) ==16958== by 0x53016C: main (llc.cpp:323)