[v3] libstdc++/46455 - fix mutex and condvar leaks

Jonathan Wakely jwakely.gcc@gmail.com
Thu Nov 18 02:59:00 GMT 2010


On 18 November 2010 02:42, Jonathan Wakely wrote:
> This change adds destructors to the mutex types in the library, it's
> not trivial and could do with more testing on platforms where thread
> model != posix.  I hacked the gthr headers to reproduce leaks under
> valgrind and think I've tested all the code paths, but I don't have
> anything suitable to add to the testsuite.

Attached is a modified gthr header I've been testing with, it might
prove useful to someone else one day.  Save this as
$foo/bits/gthr-default.h then compile with -I$foo to turn un-destroyed
mutexes into memory leaks, easily detected by valgrind. Use -DWINSTYLE
to exercise the win32 case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gthr-default.h
Type: text/x-chdr
Size: 5504 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20101118/58c68f98/attachment.bin>


More information about the Libstdc++ mailing list