[LLVMbugs] [Bug 1691] New: LoopIndexSplit reads from freed memory
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Sep 19 23:38:43 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1691
Summary: LoopIndexSplit reads from 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
Running test/Transforms/LoopIndexSplit/SaveLastValue-2007-08-17.ll
under valgrind shows:
Invalid read of size 4
at 0x82E067E: llvm::Instruction::getNext() (Instruction.h:231)
by 0x82E1A6C: llvm::SymbolTableListTraits<llvm::Instruction,
llvm::BasicBlock>::getNext(llvm::Instruction*) (SymbolTableListTraits.h:52)
by 0x82F3EA8: llvm::ilist_iterator<llvm::Instruction>::operator++()
(ilist:141)
by 0x83BB36A: (anonymous
namespace)::LoopIndexSplit::removeBlocks(llvm::BasicBlock*, llvm::Loop*,
llvm::BasicBlock*) (LoopIndexSplit.cpp:930)
by 0x83BBF14: (anonymous namespace)::LoopIndexSplit::splitLoop((anonymous
namespace)::LoopIndexSplit::SplitInfo&) (LoopIndexSplit.cpp:1351)
by 0x83BD79A: (anonymous namespace)::LoopIndexSplit::runOnLoop(llvm::Loop*,
llvm::LPPassManager&) (LoopIndexSplit.cpp:272)
by 0x8493062: llvm::LPPassManager::runOnFunction(llvm::Function&)
(LoopPass.cpp:225)
by 0x854EADB: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1168)
by 0x854EC7D: llvm::FPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1188)
by 0x854E7B1: llvm::MPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1237)
by 0x854E969: llvm::PassManagerImpl::run(llvm::Module&)
(PassManager.cpp:1310)
by 0x854E9BB: llvm::PassManager::run(llvm::Module&) (PassManager.cpp:1342)
Address 0x42df24c is 36 bytes inside a block of size 44 free'd
at 0x4022166: operator delete(void*) (vg_replace_malloc.c:336)
by 0x853A7F8: llvm::CallInst::~CallInst() (Instructions.cpp:192)
by 0x82EBB8C: llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::erase(llvm::ilist_iterator<llvm::Instruction>) (ilist:368)
by 0x852B9A8: llvm::Instruction::eraseFromParent() (Instruction.cpp:68)
by 0x83BB35C: (anonymous
namespace)::LoopIndexSplit::removeBlocks(llvm::BasicBlock*, llvm::Loop*,
llvm::BasicBlock*) (LoopIndexSplit.cpp:934)
by 0x83BBF14: (anonymous namespace)::LoopIndexSplit::splitLoop((anonymous
namespace)::LoopIndexSplit::SplitInfo&) (LoopIndexSplit.cpp:1351)
by 0x83BD79A: (anonymous namespace)::LoopIndexSplit::runOnLoop(llvm::Loop*,
llvm::LPPassManager&) (LoopIndexSplit.cpp:272)
by 0x8493062: llvm::LPPassManager::runOnFunction(llvm::Function&)
(LoopPass.cpp:225)
by 0x854EADB: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1168)
by 0x854EC7D: llvm::FPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1188)
by 0x854E7B1: llvm::MPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1237)
by 0x854E969: llvm::PassManagerImpl::run(llvm::Module&)
(PassManager.cpp:1310)
Reproduce using
llvm-as < SaveLastValue-2007-08-17.ll | valgrind --tool=memcheck opt
-loop-index-split -disable-output -stats
--
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