This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch libstdc++]: Fix PR/59807


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]