This is the mail archive of the
mailing list for the pthreas-win32 project.
tsd cleanup problem when used with native threads
- From: "Reddie, Steven" <Steven dot Reddie at ca dot com>
- To: <pthreads-win32 at sources dot redhat dot com>
- Date: Wed, 14 May 2003 17:53:40 +1000
- Subject: tsd cleanup problem when used with native threads
I'm getting a leaked thread handle and small memory leak when using tsd
from a non-threads-created-thread. The reason for this is that our tsd
cleanup callback calls pthread_self which results in the
ptw32_selfThreadKey slot being initialized again, and this is then
I can fix the problem by rearranging the two lines at
pthread_win32_attach_detach_np.c:162-163 so that the cleanup is done
before ptw32_selfThreadKey is set to NULL. This way, when pthread_self
is called during tsd cleanup self will not be recreated.
Does this sound like a reasonable change, and if so is it possible to
have it done in cvs?
Steven Reddie <Steven.Reddie@ca.com>
Development Leader - eTrust ETPKI
Computer Associates Pty Ltd (Australia)