|
From: Thomas E. <Tho...@gm...> - 2003-09-01 19:48:25
|
Nicholas Nethercote wrote:
> [...]
>>==18449== valgrind's libpthread.so: KLUDGED call to: sem_destroy
>>
>>What is going wrong, does that mean that there is a bug in my
>>application or is there a problem with valgrind and/or glibc/libpthread?
>
> Valgrind's libpthread implementation is incomplete; for some functions it
> pretends to implement them but just does a cheap imitation (a "kludge" --
> maybe we should not use this word as it's meaning doesn't seem to be
> widely known), in the hope that this is enough; often it is.
> Unfortunately, it seems that for your application it's not enough. If you
> are keen, you could try hacking coregrind/vg_libpthread.c to implement
> sem_destroy() and any other "kludged" functions to a sufficient level for
> things to work.
Hi Nicholas,
thanks for your quick response. I now know what was going wrong, it was
a double-bug im my application. The first one was that I had a call to
"delete this" in the C++ part. The second one was that the concerning
object itself was on the stack and has not been created with "new". I
only wonder why memcheck did not point me directly to this...
The kludged pthread functions seem not to be a problem, things work
quite fine with them :)
Today I learned: if valgrind complains, then there really is a problem
or a bug - but it does not necessarily have to be at exactly the
position that it shows.
thanks,
Thomas
|