[LLVMbugs] [Bug 1980] New: DSE handleEndBlock uses freed memory

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Feb 4 02:32:16 PST 2008


http://llvm.org/bugs/show_bug.cgi?id=1980

           Summary: DSE handleEndBlock uses freed memory
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu


Here's what valgrind says:

Invalid read of size 4
   at 0x85D2CAB: llvm::ilist_iterator<llvm::Instruction>::operator++()
(Instruction.h:223)
   by 0x87ECBDB: llvm::ilist_iterator<llvm::Instruction>::operator++(int)
(ilist:152)
   by 0x8BAE2CA:
llvm::MemoryDependenceAnalysis::removeInstruction(llvm::Instruction*)
(MemoryDependenceAnalysis.cpp:469)
   by 0x8ABD37A: (anonymous namespace)::DSE::handleEndBlock(llvm::BasicBlock&,
llvm::SetVector<llvm::Instruction*, std::vector<llvm::Instruction*,
std::allocator<llvm::Instruction*> >, llvm::SmallSet<llvm::Instruction*, 16>
>&) (DeadStoreElimination.cpp:280)
   by 0x8ABE293: (anonymous namespace)::DSE::runOnBasicBlock(llvm::BasicBlock&)
(DeadStoreElimination.cpp:182)
   by 0x8ABE36E: (anonymous namespace)::DSE::runOnFunction(llvm::Function&)
(DeadStoreElimination.cpp:46)
   by 0x8C434A7: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1184)
   by 0x8C43649: llvm::FPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1204)
   by 0x8C4317D: llvm::MPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1254)
   by 0x8C43335: llvm::PassManagerImpl::run(llvm::Module&)
(PassManager.cpp:1328)
   by 0x8C43387: llvm::PassManager::run(llvm::Module&) (PassManager.cpp:1360)
   by 0x8597C5F: llvm_asm_file_end (llvm-backend.cpp:561)
 Address 0x7483194 is 36 bytes inside a block of size 72 free'd
   at 0x402231C: operator delete(void*) (vg_replace_malloc.c:342)
   by 0x8C2EAD8: llvm::StoreInst::~StoreInst() (Instructions.h:293)
   by 0x87CF1EC: llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::erase(llvm::ilist_iterator<llvm::Instruction>) (ilist:368)
   by 0x8C1E7A8: llvm::Instruction::eraseFromParent() (Instruction.cpp:68)
   by 0x8ABE13A: (anonymous namespace)::DSE::runOnBasicBlock(llvm::BasicBlock&)
(DeadStoreElimination.cpp:156)
   by 0x8ABE36E: (anonymous namespace)::DSE::runOnFunction(llvm::Function&)
(DeadStoreElimination.cpp:46)
   by 0x8C434A7: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1184)
   by 0x8C43649: llvm::FPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1204)
   by 0x8C4317D: llvm::MPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1254)
   by 0x8C43335: llvm::PassManagerImpl::run(llvm::Module&)
(PassManager.cpp:1328)
   by 0x8C43387: llvm::PassManager::run(llvm::Module&) (PassManager.cpp:1360)
   by 0x8597C5F: llvm_asm_file_end (llvm-backend.cpp:561)

I hope this is enough: it is not easy to reproduce using opt.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list