pthread_key_create memory leakage in pthreads?

Simon Barner barner at FreeBSD.org
Thu Sep 29 11:25:36 PDT 2005


Lefteris Tsintjelis wrote:
> >Can you provide a (minimal) example where this happens? Also, what is
> >the exact command line?
> 
> valgrind --trace-children=yes --leak-check=yes --show-reachable=yes ./sql-m

Two other things you can try to determine whether it's you code or a
internal error in valgrind:

- make sure you compile and link your code with debugging information
  (-g), and at an reasonable optimization level (say -O).

- Use valgrinds -v option to get more information.

If you are sure, that's it's valgrind's fault, you can generate a
suppression rule:

valgrind -v --gen-suppressions=yes <other valgrind options> <command>

You can put them into a file, say ~/.valgrind-suppressions, and tell
valgrind to them with the --suppressions=<filename> switch. If you want
to use them by default, create a ~/.valgrindrc file and put the
appropriate options there.

If all that doesn't help you, you're welcome to send me a copy of your
code (in a private mail), and I'll have a look.
-- 
Best regards / Viele Grüße,                             barner at FreeBSD.org
 Simon Barner                                                barner at gmx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20050929/20225363/attachment.bin


More information about the freebsd-stable mailing list