valgrind error - still reachable

This is a discussion on valgrind error - still reachable within the C Programming forums, part of the General Programming Boards category; I am not sure if this counts as an error in valgrind: Code: Thread 3: ==16388== Invalid read of size ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Location
    Greece
    Posts
    52

    valgrind error - still reachable

    I am not sure if this counts as an error in valgrind:

    Code:
    Thread 3:
    ==16388== Invalid read of size 4
    ==16388==    at 0x40151F3: (within /lib/ld-2.7.so)
    ==16388==    by 0x4005C69: (within /lib/ld-2.7.so)
    ==16388==    by 0x4007A97: (within /lib/ld-2.7.so)
    ==16388==    by 0x4011543: (within /lib/ld-2.7.so)
    ==16388==    by 0x400D5D5: (within /lib/ld-2.7.so)
    ==16388==    by 0x4010F5D: (within /lib/ld-2.7.so)
    ==16388==    by 0x415F291: (within /lib/tls/i686/cmov/libc-2.7.so)
    ==16388==    by 0x400D5D5: (within /lib/ld-2.7.so)
    ==16388==    by 0x415F454: __libc_dlopen_mode (in /lib/tls/i686/cmov/libc-2.7.so)
    ==16388==    by 0x4047686: pthread_cancel_init (in /lib/tls/i686/cmov/libpthread-2.7.so)
    ==16388==    by 0x40477B0: _Unwind_ForcedUnwind (in /lib/tls/i686/cmov/libpthread-2.7.so)
    ==16388==    by 0x4045210: __pthread_unwind (in /lib/tls/i686/cmov/libpthread-2.7.so)
    ==16388==  Address 0x441d5f8 is 16 bytes inside a block of size 19 alloc'd
    ==16388==    at 0x4022AB8: malloc (vg_replace_malloc.c:207)
    ==16388==    by 0x4008031: (within /lib/ld-2.7.so)
    ==16388==    by 0x4011543: (within /lib/ld-2.7.so)
    ==16388==    by 0x400D5D5: (within /lib/ld-2.7.so)
    ==16388==    by 0x4010F5D: (within /lib/ld-2.7.so)
    ==16388==    by 0x415F291: (within /lib/tls/i686/cmov/libc-2.7.so)
    ==16388==    by 0x400D5D5: (within /lib/ld-2.7.so)
    ==16388==    by 0x415F454: __libc_dlopen_mode (in /lib/tls/i686/cmov/libc-2.7.so)
    ==16388==    by 0x4047686: pthread_cancel_init (in /lib/tls/i686/cmov/libpthread-2.7.so)
    ==16388==    by 0x40477B0: _Unwind_ForcedUnwind (in /lib/tls/i686/cmov/libpthread-2.7.so)
    ==16388==    by 0x4045210: __pthread_unwind (in /lib/tls/i686/cmov/libpthread-2.7.so)
    ==16388==    by 0x403F5EF: pthread_exit (in /lib/tls/i686/cmov/libpthread-2.7.so)
    
    
    <results go here>
    
    
     ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 15 from 1)
    ==16388== malloc/free: in use at exit: 892 bytes in 5 blocks.
    ==16388== malloc/free: 811 allocs, 806 frees, 2,564,636 bytes allocated.
    ==16388== For counts of detected errors, rerun with: -v
    ==16388== searching for pointers to 5 not-freed blocks.
    ==16388== checked 85,840 bytes.
    ==16388== 
    ==16388== LEAK SUMMARY:
    ==16388==    definitely lost: 0 bytes in 0 blocks.
    ==16388==      possibly lost: 0 bytes in 0 blocks.
    ==16388==    still reachable: 892 bytes in 5 blocks.
    ==16388==         suppressed: 0 bytes in 0 blocks.
    ==16388== Reachable blocks (those to which a pointer was found) are not shown.
    From the FAQ:
    http://valgrind.org/docs/manual/faq.html#faq.reports
    and
    http://valgrind.org/docs/manual/faq.html#faq.deflost

    I have used C and the pthread library. Should I try to find these errors refer? I tested the program with a larger size of input (much larger) but the bytes which are shown in the Leak Summary as still reachable still remain an insignificant amount.
    Is there a real problem or just because of the allocation pools as the FAQ suggests?

  2. #2
    Registered User
    Join Date
    Apr 2009
    Posts
    1

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory Analyzer Tool
    By edesign in forum C Programming
    Replies: 9
    Last Post: 06-08-2009, 01:54 PM
  2. Bug hunting with Valgrind
    By Smjert in forum C Programming
    Replies: 8
    Last Post: 11-06-2008, 04:21 AM
  3. Replies: 1
    Last Post: 12-01-2007, 02:06 AM
  4. Is valgrind always right?
    By g4j31a5 in forum Linux Programming
    Replies: 3
    Last Post: 07-16-2007, 11:39 PM
  5. Valgrind output
    By m_larkin2001 in forum C++ Programming
    Replies: 1
    Last Post: 06-09-2006, 03:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21