For a while I thought this was a glib libpthread prolem.. but when I noticed
"/usr/lib/valgrind/libpthread.so"
that libpthread was IN valgrind itself... I think it's got something to do
with valgrind.
I created some thread specific data areas... starting at line 57 as per
valgrinds output I have
/*LINE 57*/if ( pthread_key_create( &global_pthread_base_dir, free_base_dir )
!= 0 ) {
printf( "File: %s. Line: %d. Error initialising key.\n", __FILE__,
__LINE__ );
return 0;
}
then before I exit the program I have
if ( pthread_key_delete( global_pthread_base_dir ) != 0 ) {
printf( "File: %s. Line: %d. Error deleting key.\n", __FILE__, __LINE__
);
return 0;
}
When I exit I notice that it appears there is a debug libpthread being used...
So I'm thinking the problem is in valgrind debug pthread libraries itself.
Or is it me?
200 bytes in 1 blocks are still reachable in loss record 1 of 1
==17060== at 0x40215D2B: my_malloc (in /usr/lib/valgrind/libpthread.so)
==17060== by 0x402178A2: get_or_allocate_specifics_ptr (in
/usr/lib/valgrind/libpthread.so)
==17060== by 0x402179D5: __pthread_key_create (in
/usr/lib/valgrind/libpthread.so)
==17060== by 0x805612C: main (main.c:57)
==17060== by 0x4028CDC3: __libc_start_main (in /lib/libc-2.3.1.so)
==17060== by 0x804BB90: (within
/home/chatgris/code/mastermailings/code/daemons/list_manager/list_manager)
Josh
|