From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17635 invoked by alias); 27 Sep 2016 20:13:40 -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 17570 invoked by uid 89); 27 Sep 2016 20:13:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=our, hands, among X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f66.google.com Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Sep 2016 20:13:27 +0000 Received: by mail-wm0-f66.google.com with SMTP id b4so2804505wmb.2; Tue, 27 Sep 2016 13:13:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=XK8P0nyDll0ox8QTgAAnoY7jc3c5bb7fxfEyyFY6u4Y=; b=iPj65ROH6pkWBLEKMHO9MFVnWgeZS95o1KSu1zfc1zJQgiE+asj+JcYf1pfoljmRzx qvpuvYbE+nW9B9ncqsRlMXANivzTUdT5YQdgXLjKLjaLaZmbP5Dhu7KsvY5m7KzuaTPm NKMMZm5henmIGWnRhi84JyHXTc+COge4A7CBtOt6ghVsq4YwGT1u/dNIzExTac0FCMm6 pXVI79iNDOz48je8SqAo4dt9XVf396/bmq5T1WqsnJYZA2g1gJk6VLHOS/VRdcQSukTs OaXcBHxdnvuGmSR460/muyw+LGk81lEak7GfzALJdlJOHzsoc2mLhJYyT0oWrBETxBC/ CPsw== X-Gm-Message-State: AA6/9RkVqQMY+ilDU3GEux71V8FpPj7qsTWVeattE2CcUvDtEO6oo5TpEaEVMspq/iQdkA== X-Received: by 10.194.173.168 with SMTP id bl8mr13766284wjc.105.1475007205006; Tue, 27 Sep 2016 13:13:25 -0700 (PDT) Received: from [192.168.0.23] (arf62-1-82-237-250-248.fbx.proxad.net. [82.237.250.248]) by smtp.googlemail.com with ESMTPSA id g17sm4864979wme.3.2016.09.27.13.13.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Sep 2016 13:13:23 -0700 (PDT) Subject: Re: debug container mutex association To: Jonathan Wakely References: <46b4f297-c0da-b0b0-03ef-bba019b97ec7@gmail.com> <20160914090036.GC17376@redhat.com> <20160915085143.GJ17376@redhat.com> <2af7879c-bef5-7874-b5ae-722ad3a1e171@gmail.com> <20160920085319.GC17376@redhat.com> <20160927152915.GA12862@redhat.com> Cc: "libstdc++@gcc.gnu.org" , gcc-patches From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: <1a3c5bfe-8b45-e251-9901-753980530fbe@gmail.com> Date: Tue, 27 Sep 2016 21:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160927152915.GA12862@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2016-09/txt/msg02065.txt.bz2 On 27/09/2016 17:29, Jonathan Wakely wrote: > On 20/09/16 09:53 +0100, Jonathan Wakely wrote: >> On 19/09/16 21:56 +0200, François Dumont wrote: >>> Hi >>> >>> Following our conversation here is a much simpler patch. I just >>> consider that all debug containers will have the same alignment. >>> >>> Even if I submit this patch as a whole I will commit into pieces, >>> at least one for the pure cleanup parts and one for the debug.cc >>> change. >>> >>> Among those changes there is: >>> - __gnu_cxx::__scoped_lock(this->_M_get_mutex()); >>> + __gnu_cxx::__scoped_lock __l(this->_M_get_mutex()); >>> >>> I would appreciate if you could tell me what was happening with >>> the initial expression. I don't understand why it is compiling. I >>> even tried the same in debug.cc and started having compilation errors. >> >> It creates a temporary __scoped_lock, which immediately goes out of >> scope and unlocks the mutex again. This should be fixed on the gcc-5 >> and gcc-6 branches too. > > I'm committing this to the gcc-5 and gcc-6 branches. > > I still had plan to do so but if you have those branches under your hands I appreciate. Thanks, François