|
From: Nicholas N. <nj...@cs...> - 2005-07-19 03:53:23
|
On Mon, 11 Jul 2005, Simon Vaillancourt wrote:
> I have noticed the following behaviour with valgrind, if you create a key
> with a destructor and you set it from the main thread:
>
> if (rc=pthread_key_create(&gKey,free))
> {
> perror("pthread_key_create");
> }
> else
> {
> if (rc=pthread_setspecific(gKey,(void*)strdup("I will be reported as
> a leak")))
> {
> perror("pthread_setspecific1");
> }
> }
>
> It will report a leak if the pthread_setspecific() was called from the main
> thread(wrong) but no leak when its called from a spawned thread(correct). I'm
> not sure it's a valgrind bug however.
If you are still seeing this can you please enter it as a Bugzilla report
(http://bugs.kde.org/enter_valgrind_bug.cgi) so this doesn't get lost.
It would be very helpful if you could post a complete program that
exhibits the problem. Thanks.
N
|