|
From: Nicholas N. <nj...@cs...> - 2005-03-18 20:18:12
|
On Fri, 18 Mar 2005, Craig Verge wrote: > Is the following memory leak reported by valgrind a bug in my code or a bug > with valgrind? I'm not sure how a user of pthread_create() could cause > this? > > ==751== 200 bytes in 1 blocks are definitely lost in loss record 305 of 332 > ==751== at 0x404DEE5B: (within > /mnt/image/opt/msp/tools/lib/valgrind/libpthread.so) > ==751== by 0x404E09F1: (within > /mnt/image/opt/msp/tools/lib/valgrind/libpthread.so) > ==751== by 0x404E0B24: __pthread_key_create (in > /mnt/image/opt/msp/tools/lib/valgrind/libpthread.so) > ==751== by 0x404E133E: (within > /mnt/image/opt/msp/tools/lib/valgrind/libpthread.so) > ==751== by 0x404DF72C: pthread_create (in > /mnt/image/opt/msp/tools/lib/valgrind/libpthread.so) > ==751== by 0x40EE0964: tenv::TenvAgInit::TenvAgInit() (agInit.cc:142) > ==751== by 0x40EE03D1: __static_initialization_and_destruction_0(int, > int) (agGlob.cc:56) > ==751== by 0x40EE045A: _GLOBAL__I__ZN4tenv8perProcTE (agGlob.cc:56) > ==751== by 0x40EE9FD4: (within /mnt/cmp/lib/libtenvag.so.1.3.0) > ==751== by 0x40EDF7FD: (within /mnt/cmp/lib/libtenvag.so.1.3.0) > ==751== by 0x4000B5C0: _dl_init_internal (in /lib/ld-2.3.2.so) > ==751== by 0x40000A8C: (within /lib/ld-2.3.2.so) I'm guessing it's a Valgrind bug. We had a 200-byte leak in our libpthread.so. It's normally suppressed but it seems that on your system valgrind's libpthread.so has been stripped, so the suppression won't match. If you try 2.4.0-rc4 (www.goop.org/~jeremy/valgrind/dist/), we now use the system libpthread, and the leak checker has been improved, so hopefully the problem will no longer be present. N |