[LLVMbugs] [Bug 1689] New: lli reads freed memory on bit-intrinsics.ll

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Sep 19 23:25:41 PDT 2007


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

           Summary: lli reads freed memory on bit-intrinsics.ll
           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/Codegen/Generic/bit-intrinsics.ll under valgrind gives
the following:

Invalid read of size 2
   at 0x8329D52: llvm::Value::getValueID() const (Value.h:207)
   by 0x841B920: llvm::Instruction::getOpcode() const (Instruction.h:104)
   by 0x843E706: llvm::CallInst::classof(llvm::Instruction const*)
(Instructions.h:931)
   by 0x843F9B8: bool llvm::isa_impl<llvm::CallInst,
llvm::Instruction>(llvm::Instruction const&) (Casting.h:54)
   by 0x843F9CE: llvm::isa_impl_wrap<llvm::CallInst, llvm::Instruction const,
llvm::Instruction const>::doit(llvm::Instruction const&) (Casting.h:71)
   by 0x843F9E4: bool
llvm::isa_impl_cl<llvm::Instruction>::isa<llvm::CallInst>(llvm::Instruction
const&) (Casting.h:83)
   by 0x843F9FA: bool llvm::isa<llvm::CallInst,
llvm::Instruction>(llvm::Instruction const&) (Casting.h:116)
   by 0x84392B4: llvm::Interpreter::run() (Execution.cpp:1368)
   by 0x843DDF1: llvm::Interpreter::runFunction(llvm::Function*,
std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&)
(Interpreter.cpp:102)
   by 0x845B9BA: llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
std::vector<std::string, std::allocator<std::string> > const&, char const*
const*) (ExecutionEngine.cpp:284)
   by 0x8329B94: main (lli.cpp:141)
 Address 0x42d305c is 4 bytes inside a block of size 44 free'd
   at 0x4022166: operator delete(void*) (vg_replace_malloc.c:336)
   by 0x86A6268: llvm::CallInst::~CallInst() (Instructions.cpp:192)
   by 0x85B5F92: llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction>
>::erase(llvm::ilist_iterator<llvm::Instruction>) (ilist:368)
   by 0x869739C: llvm::Instruction::eraseFromParent() (Instruction.cpp:68)
   by 0x8562A41: llvm::IntrinsicLowering::LowerIntrinsicCall(llvm::CallInst*)
(IntrinsicLowering.cpp:801)
   by 0x843701C: llvm::Interpreter::visitCallSite(llvm::CallSite)
(Execution.cpp:874)
   by 0x8444903: llvm::Interpreter::visitCallInst(llvm::CallInst&)
(Interpreter.h:164)
   by 0x844491D: llvm::InstVisitor<llvm::Interpreter,
void>::visitCall(llvm::CallInst&) (Instruction.def:159)
   by 0x8444F15: llvm::InstVisitor<llvm::Interpreter,
void>::visit(llvm::Instruction&) (Instruction.def:159)
   by 0x84392A9: llvm::Interpreter::run() (Execution.cpp:1366)
   by 0x843DDF1: llvm::Interpreter::runFunction(llvm::Function*,
std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&)
(Interpreter.cpp:102)
   by 0x845B9BA: llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
std::vector<std::string, std::allocator<std::string> > const&, char const*
const*) (ExecutionEngine.cpp:284)

Reproduce as follows:
  llvm-as -f bit-intrinsics.ll
  valgrind --tool=memcheck lli --force-interpreter=true bit-intrinsics.bc


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