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

           Summary: memory unsafety bug
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


Created an attachment (id=6044)
 --> (http://llvm.org/bugs/attachment.cgi?id=6044)
failure-inducing C code

We've been seeing some odd compiler hangs and reports of heap corruption from
glibc; valgrind says it's a use-after-free problem. Sorry for the not-reduced
testcase.

regehr@home:~$ valgrind -q --trace-children=yes clang -O2 -w small.c
==30005== Invalid read of size 4
==30005==    at 0x948B53E:
llvm::FoldingSetImpl::InsertNode(llvm::FoldingSetImpl::Node*, void*) (in
/mnt/z/z/compiler-install/llvm-gcc-r124171-install/bin/clang)
==30005==    by 0x4B9DD63: ???
==30005==  Address 0x465e064 is 124 bytes inside a block of size 260 free'd
==30005==    at 0x40257ED: free (vg_replace_malloc.c:366)
==30005==    by 0x948B4B3: llvm::FoldingSetImpl::GrowHashTable() (in
/mnt/z/z/compiler-install/llvm-gcc-r124171-install/bin/clang)
==30005== 
==30005== Invalid write of size 4
==30005==    at 0x948B54C:
llvm::FoldingSetImpl::InsertNode(llvm::FoldingSetImpl::Node*, void*) (in
/mnt/z/z/compiler-install/llvm-gcc-r124171-install/bin/clang)
==30005==    by 0x4B9DD63: ???
==30005==  Address 0x465e064 is 124 bytes inside a block of size 260 free'd
==30005==    at 0x40257ED: free (vg_replace_malloc.c:366)
==30005==    by 0x948B4B3: llvm::FoldingSetImpl::GrowHashTable() (in
/mnt/z/z/compiler-install/llvm-gcc-r124171-install/bin/clang)
==30005== 
regehr@home:~$ 
regehr@home:~$ 
regehr@home:~$ 
regehr@home:~$ clang -v
clang version 2.9 (trunk 124171)
Target: i386-pc-linux-gnu
Thread model: posix

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to