This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/59807] mutex misses destructor if non-function call initialization is used
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Jan 2014 17:19:43 +0000
- Subject: [Bug libstdc++/59807] mutex misses destructor if non-function call initialization is used
- Auto-submitted: auto-generated
- References: <bug-59807-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59807
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It a target's pthread_mutex requires cleanup then it should not define
__GTHREAD_MUTEX_INIT, it should use the init function, and then it gets a
chance to also run a destroy function.
That can be controlled by defining _GTHREAD_USE_MUTEX_INIT_FUNC in the relevant
libstdc++-v3/config/os/xxx/os_defines.h header.