From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13546 invoked by alias); 14 Oct 2014 13:07:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 13533 invoked by uid 89); 14 Oct 2014 13:06:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f179.google.com Received: from mail-ig0-f179.google.com (HELO mail-ig0-f179.google.com) (209.85.213.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 14 Oct 2014 13:06:57 +0000 Received: by mail-ig0-f179.google.com with SMTP id h18so14531481igc.0 for ; Tue, 14 Oct 2014 06:06:55 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.107.137.36 with SMTP id l36mr1967656iod.61.1413292015110; Tue, 14 Oct 2014 06:06:55 -0700 (PDT) Received: by 10.64.242.166 with HTTP; Tue, 14 Oct 2014 06:06:55 -0700 (PDT) Date: Tue, 14 Oct 2014 13:07:00 -0000 Message-ID: Subject: [patch libstdc++]: Fix PR/59807 From: Kai Tietz To: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg01233.txt.bz2 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 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