LINUX.ORG.RU

valgrind and pthread


0

0

есть valgrind 3.0.1
gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/specs
Configured with: ../gcc-3.3.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.6

glibc 2.3.5

небольшая программка

#include <pthread.h>

void *thread(void *vargp) {
pthread_exit(NULL);
}

int main() {
pthread_t tid;
pthread_create(&tid,NULL,thread,NULL);
pthread_join(tid,NULL);
return 0;
}

собираю

cc -Wall -lpthread thr.c

стравливаю ее valgrind'у
valgrind --tool=memcheck --verbose --trace-children=yes --track-fds=yes --run-libc-freeres=no --pointercheck=yes --log-file=log --leak-check=yes --leak-resolution=high --workaround-gcc296-bugs=yes --show-reachable=yes ./a.out

в его логе вижу

<skip>
--4901-- supp: 3 index-not-intercepted-early-enough-HACK-2
--4901-- supp: 17 dl_relocate_object
--4901-- supp: 2 strlen/*dl_map_object*(Cond)
==4901== malloc/free: in use at exit: 888 bytes in 6 blocks.
==4901== malloc/free: 6 allocs, 0 frees, 888 bytes allocated.
==4901==
==4901== searching for pointers to 6 not-freed blocks.
==4901== checked 8475504 bytes.
==4901== 23 bytes in 1 blocks are still reachable in loss record 1 of 6
==4901== at 0x1B8FF8DB: malloc (vg_replace_malloc.c:149)
==4901== by 0x1B8EC634: _dl_new_object (in /lib/ld-2.3.5.so)
==4901== by 0x1B8E956E: _dl_map_object_from_fd (in /lib/ld-2.3.5.so)
==4901== by 0x1B8E8181: _dl_map_object (in /lib/ld-2.3.5.so)
==4901== by 0x1BA09E23: dl_open_worker (in /lib/tls/libc-2.3.5.so)
==4901== by 0x1B8EF3D5: _dl_catch_error (in /lib/ld-2.3.5.so)
==4901== by 0x1BA09B7F: _dl_open (in /lib/tls/libc-2.3.5.so)
==4901== by 0x1BA0BD0E: do_dlopen (in /lib/tls/libc-2.3.5.so)
==4901== by 0x1B8EF3D5: _dl_catch_error (in /lib/ld-2.3.5.so)
==4901== by 0x1BA0BB71: __libc_dlopen_mode (in /lib/tls/libc-2.3.5.so)
==4901== by 0x1B91A217: _Unwind_ForcedUnwind (in /lib/tls/libpthread-2.3.5.so)
==4901== by 0x1B918042: __pthread_unwind (in /lib/tls/libpth

<skip>

==4901== LEAK SUMMARY:
==4901== definitely lost: 0 bytes in 0 blocks.
==4901== possibly lost: 68 bytes in 1 blocks.
==4901== still reachable: 820 bytes in 5 blocks.
==4901== suppressed: 0 bytes in 0 blocks.
--4901-- memcheck: sanity checks: 0 cheap, 1 expensive
--4901-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--4901-- memcheck: auxmaps: 0 searches, 0 comparisons
--4901-- memcheck: secondaries: 12 issued (768k, 0M)
--4901-- memcheck: secondaries: 143 accessible and distinguished (9152k, 8M)
--4901-- tt/tc: 4406 tt lookups requiring 4463 probes
--4901-- tt/tc: 4406 fast-cache updates, 4 flushes
--4901-- translate: new 2091 (43663 -> 715753; ratio 163:10) [0 scs]
--4901-- translate: dumped 0 (0 -> ??)
--4901-- translate: discarded 8 (233 -> ??)
--4901-- scheduler: 51272 jumps (bb entries).
--4901-- scheduler: 0/2392 major/minor sched events.
--4901-- sanity: 1 cheap, 1 expensive checks.
--4901-- exectx: 4999 lists, 23 contexts (avg 0 per list)
--4901-- exectx: 36 searches, 13 full compares (361 per 1000)
--4901-- exectx: 0 cmp2, 86 cmp4, 10 cmpAll

это valgrind глисит или непорядок с nptl?

anonymous

совсем забыл
ядро 2.6.14

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.