[LLVMbugs] [Bug 1221] NEW: Read from object already freed.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 24 12:06:14 PST 2007


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

           Summary: Read from object already freed.
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: asl at math.spbu.ru


Consider the attached .i file.

Valgrind output:

==16630== Invalid read of size 1
==16630==    at 0x828BC96: default_strip_name_encoding (in
/home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630==  Address 0x47D6F1C is 12 bytes inside a block of size 21 free'd
==16630==    at 0x402167A: operator delete(void*) (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==16630==    by 0x40F48A0: std::string::_Rep::_M_destroy(std::allocator<char>
const&) (in /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6.0.3)
==16630==    by 0x829655E: llvm_get_decl_name (in
/home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630== 
==16630== Invalid read of size 1
==16630==    at 0x4022593: strlen (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==16630==    by 0x88114AA: xstrdup (in /home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630==  Address 0x47D6F1C is 12 bytes inside a block of size 21 free'd
==16630==    at 0x402167A: operator delete(void*) (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==16630==    by 0x40F48A0: std::string::_Rep::_M_destroy(std::allocator<char>
const&) (in /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6.0.3)
==16630==    by 0x829655E: llvm_get_decl_name (in
/home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630== 
==16630== Invalid read of size 1
==16630==    at 0x402259B: strlen (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==16630==    by 0x88114AA: xstrdup (in /home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630==  Address 0x47D6F1D is 13 bytes inside a block of size 21 free'd
==16630==    at 0x402167A: operator delete(void*) (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==16630==    by 0x40F48A0: std::string::_Rep::_M_destroy(std::allocator<char>
const&) (in /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6.0.3)
==16630==    by 0x829655E: llvm_get_decl_name (in
/home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630== 
==16630== Invalid read of size 1
==16630==    at 0x40229B7: memcpy (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==16630==    by 0x88114C7: xstrdup (in /home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630==  Address 0x47D6F24 is 20 bytes inside a block of size 21 free'd
==16630==    at 0x402167A: operator delete(void*) (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==16630==    by 0x40F48A0: std::string::_Rep::_M_destroy(std::allocator<char>
const&) (in /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6.0.3)
==16630==    by 0x829655E: llvm_get_decl_name (in
/home/asl/proj/llvm/gccbuild/gcc/cc1)
==16630== 

Steps to reproduce:
valgrind cc1 libgcc2.i



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list