diff mbox

[libstdc++] : Fix PR/59807

Message ID CAEwic4Zrt+KErP=cwppsh_qi63sj_zPmP02YrGF6ycmdBUPKcg@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Oct. 14, 2014, 1:06 p.m. UTC
Hi,

this patch fixes issue PR/59807 "mutex misses destructor if
non-function call initialization is used".  This issue just got
reported for mingw-w64, as this is the only venture providing
posix-threading enabled toolchains (C++11).  Nevertheless this issue
could happen for other native Windows toolchains, too. Therefore I
adjusted the default mingw32-case, too.

ChangeLog

2014-10-14  Kai Tietz  <ktietz@redhat.com>

    PR libstdc++/59807
    * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
    Define to avoid leak.
    * config/os/mingw32-w64/os_defines.h: Likewise.

I am just testing bootstrap for it, and if successful, I will commit.

Thanks,
Kai
diff mbox

Patch

Index: config/os/mingw32/os_defines.h
===================================================================
--- config/os/mingw32/os_defines.h    (Revision 216199)
+++ config/os/mingw32/os_defines.h    (Arbeitskopie)
@@ -75,4 +75,7 @@ 
 #define _GLIBCXX_LLP64 1
 #endif

+// See libstdc++/59807
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
+
 #endif
Index: config/os/mingw32-w64/os_defines.h
===================================================================
--- config/os/mingw32-w64/os_defines.h    (Revision 216199)
+++ config/os/mingw32-w64/os_defines.h    (Arbeitskopie)
@@ -83,4 +83,7 @@ 
 // their dtors are called
 #define _GLIBCXX_THREAD_ATEXIT_WIN32 1

+// See libstdc++/59807
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
+
 #endif