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?