public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kai Tietz <ktietz70@googlemail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [patch libstdc++]: Fix PR/59807
Date: Tue, 14 Oct 2014 13:07:00 -0000	[thread overview]
Message-ID: <CAEwic4Zrt+KErP=cwppsh_qi63sj_zPmP02YrGF6ycmdBUPKcg@mail.gmail.com> (raw)

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

                 reply	other threads:[~2014-10-14 13:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEwic4Zrt+KErP=cwppsh_qi63sj_zPmP02YrGF6ycmdBUPKcg@mail.gmail.com' \
    --to=ktietz70@googlemail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).