From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26631 invoked by alias); 30 Sep 2014 20:18:30 -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 26603 invoked by uid 89); 30 Sep 2014 20:18:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wi0-f178.google.com Received: from mail-wi0-f178.google.com (HELO mail-wi0-f178.google.com) (209.85.212.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 30 Sep 2014 20:18:29 +0000 Received: by mail-wi0-f178.google.com with SMTP id ho1so5528004wib.5 for ; Tue, 30 Sep 2014 13:18:25 -0700 (PDT) X-Received: by 10.180.184.20 with SMTP id eq20mr8256219wic.61.1412108305771; Tue, 30 Sep 2014 13:18:25 -0700 (PDT) Received: from [10.2.116.96] (lhc-ac1.isrighthere.com. [193.93.203.40]) by mx.google.com with ESMTPSA id nf2sm16296488wic.4.2014.09.30.13.18.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Sep 2014 13:18:24 -0700 (PDT) Message-ID: <542B1010.3030301@gmail.com> Date: Tue, 30 Sep 2014 20:18:00 -0000 From: =?windows-1252?Q?Fran=E7ois_Dumont?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Jonathan Wakely CC: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: [Bug libstdc++/62313] Data race in debug iterators References: <5410BAB5.90803@gmail.com> <20140921220411.GD22778@redhat.com> <5421DB37.8080307@gmail.com> <54249096.5020408@gmail.com> <20140926100510.GJ2669@redhat.com> <20140930153241.GK4197@redhat.com> In-Reply-To: <20140930153241.GK4197@redhat.com> Content-Type: multipart/mixed; boundary="------------080405000608030903040505" X-SW-Source: 2014-09/txt/msg02696.txt.bz2 This is a multi-part message in MIME format. --------------080405000608030903040505 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-length: 1232 Hi I prefer to submit this patch to you cause I am not very comfortable with Python stuff. I simply rely on Python cast feature. It doesn't really matter but is it going to simply consider the debug iterator as a normal one or is it going through the C++ explicit cast operator on debug iterators ? François On 30/09/2014 17:32, Jonathan Wakely wrote: > On 26/09/14 11:05 +0100, Jonathan Wakely wrote: >> On 26/09/14 00:00 +0200, François Dumont wrote: >>> >>>>> Apart from those minor adjustments I think this looks good, but I'd >>>>> like to know that it has been tested with -fsanitize=thread, even if >>>>> only lightly tested. >>>>> >>>>> >>> >>> Hi >>> >>> Dmitry, who reported the bug, confirmed the fix. Can I go ahead >>> and commit ? >> >> Yes, OK. > > This caused some failures in the printer tests: > > Running > /home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp > ... > FAIL: libstdc++-prettyprinters/debug.cc print deqiter > FAIL: libstdc++-prettyprinters/debug.cc print lstiter > FAIL: libstdc++-prettyprinters/debug.cc print lstciter > FAIL: libstdc++-prettyprinters/debug.cc print mpiter > FAIL: libstdc++-prettyprinters/debug.cc print spciter > > --------------080405000608030903040505 Content-Type: text/x-patch; name="pretty_printers.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pretty_printers.patch" Content-length: 510 Index: python/libstdcxx/v6/printers.py =================================================================== --- python/libstdcxx/v6/printers.py (revision 215741) +++ python/libstdcxx/v6/printers.py (working copy) @@ -460,7 +460,7 @@ # and return the wrapped iterator value. def to_string (self): itype = self.val.type.template_argument(0) - return self.val['_M_current'].cast(itype) + return self.val.cast(itype) class StdMapPrinter: "Print a std::map or std::multimap" --------------080405000608030903040505--