[LLVMbugs] [Bug 1685] New: eraseLocalLLVMValues accesses memory freed in emit_global_to_llvm

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Sep 19 08:34:56 PDT 2007


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

           Summary: eraseLocalLLVMValues accesses memory freed in
                    emit_global_to_llvm
           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


Compiling test/C++Frontend/2007-01-06-PtrMethodInit.cpp with
llvm-gcc-4.2 running under valgrind shows the following:

==12998== Invalid read of size 2
==12998==    at 0x84FD3FC: eraseLocalLLVMValues() (Value.h:207)
==12998==    by 0x851E9D0: TreeToLLVM::FinishFunctionBody()
(llvm-convert.cpp:766)
...
==12998==  Address 0x438a9c4 is 4 bytes inside a block of size 68 free'd
==12998==    at 0x4022166: operator delete(void*) (vg_replace_malloc.c:336)
==12998==    by 0x8AE1C3E: llvm::GlobalVariable::~GlobalVariable()
(GlobalVariable.h:33)
==12998==    by 0x84F585F: emit_global_to_llvm (llvm-backend.cpp:821)


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