[LLVMbugs] [Bug 2397] New: gvn reads freed memory

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat May 31 11:57:42 PDT 2008


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

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


Created an attachment (id=1688)
 --> (http://llvm.org/bugs/attachment.cgi?id=1688)
testcase .ll

$ valgrind opt -gvn x.bc --disable-output

Invalid read of size 2
   at 0x82C4562: llvm::Value::getValueID() const (Value.h:212)
   by 0x82C45D6: bool llvm::isa_impl<llvm::Instruction,
llvm::Value>(llvm::Value const&) (Value.h:261)
   by 0x82C4CA4: llvm::isa_impl_wrap<llvm::Instruction, llvm::Value const,
llvm::Value const>::doit(llvm::Value const&) (Casting.h:71)
   by 0x82C4CBA: bool
llvm::isa_impl_cl<llvm::Value>::isa<llvm::Instruction>(llvm::Value const&)
(Casting.h:83)
   by 0x82E01C2: bool llvm::isa_impl_cl<llvm::Value
const>::isa<llvm::Instruction>(llvm::Value const&) (Casting.h:92)
   by 0x82E01D8: bool llvm::isa_impl_cl<llvm::Value
const*>::isa<llvm::Instruction>(llvm::Value const*) (Casting.h:101)
   by 0x82E01F0: bool llvm::isa<llvm::Instruction, llvm::Value
const*>(llvm::Value const* const&) (Casting.h:116)
   by 0x83079A6: llvm::StoreInst::classof(llvm::Value const*)
(Instructions.h:354)
   by 0x834EED0: bool llvm::isa_impl<llvm::StoreInst, llvm::Value>(llvm::Value
const&) (Casting.h:54)
   by 0x834EEE6: llvm::isa_impl_wrap<llvm::StoreInst, llvm::Value const,
llvm::Value const>::doit(llvm::Value const&) (Casting.h:71)
   by 0x834EEFC: bool
llvm::isa_impl_cl<llvm::Value>::isa<llvm::StoreInst>(llvm::Value const&)
(Casting.h:83)
   by 0x834EF12: bool
llvm::isa_impl_cl<llvm::Value*>::isa<llvm::StoreInst>(llvm::Value*)
(Casting.h:101)
 Address 0x6c7ace0 is 16 bytes inside a block of size 52 free'd
   at 0x68022EC: operator delete(void*) (vg_replace_malloc.c:342)
   by 0x858DA60: llvm::User::operator delete(void*) (Value.cpp:375)
   by 0x855F2BA: llvm::LoadInst::~LoadInst() (Instructions.h:216)
   by 0x82F2F16: llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::erase(llvm::ilist_iterator<llvm::Instruction>) (ilist.h:377)
   by 0x854EF26: llvm::Instruction::eraseFromParent() (Instruction.cpp:68)
   by 0x834CFFA: (anonymous namespace)::GVN::iterateOnFunction(llvm::Function&)
(GVN.cpp:1186)
   by 0x834D17F: (anonymous namespace)::GVN::runOnFunction(llvm::Function&)
(GVN.cpp:1120)
   by 0x856F59A: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1178)
   by 0x856F73B: llvm::FPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1198)
   by 0x856F221: llvm::MPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1248)
   by 0x856F3D9: llvm::PassManagerImpl::run(llvm::Module&)
(PassManager.cpp:1322)
   by 0x856F42C: llvm::PassManager::run(llvm::Module&) (PassManager.cpp:1354)


-- 
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