From patchwork Wed Nov 30 14:45:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 85880 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp259213qgi; Wed, 30 Nov 2016 06:46:13 -0800 (PST) X-Received: by 10.84.197.1 with SMTP id m1mr74516134pld.159.1480517173519; Wed, 30 Nov 2016 06:46:13 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m32si36262877pld.319.2016.11.30.06.46.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Nov 2016 06:46:13 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443075-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443075-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443075-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=OqklvM4QmYLRm+ueH F+EBmOMoo3Y5wrcqDKmhPSXtmh+B8mgq8b2SjL4N2OR1mtWHDNZXvLaeA+ooAfnj GvTtOBTLSxrwJ8HlNhMvB0MiyYS/xxhORshhHA4B8rqsH+NnKCyDPx580CSSPoO5 3bwOgMO9nhdy79hI8G2FoJXOXU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=JbPtGQ0AAKc7ssklZ5uYfFY NdUw=; b=udIAO0u+Oxipp8ktVHDM4fjaivRAEyzb4kBCuHY+75CzGbHgH/Fovqo SnH9Imc8SOHnL2s4tO43auXbsqWpNpOvpDdaxT78el6aEtcN1Wo9JMME4GOLih+l aUFwthMw32HM6ogsFfv4J1h8YR1uXl+Oh+sKsuhnQFrnTO/IrVZg= Received: (qmail 51661 invoked by alias); 30 Nov 2016 14:45:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 51586 invoked by uid 89); 30 Nov 2016 14:45:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1512, (unknown), 20161130 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Nov 2016 14:45:29 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2404519CBD8; Wed, 30 Nov 2016 14:45:28 +0000 (UTC) Received: from localhost (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAUEjRKU017205; Wed, 30 Nov 2016 09:45:27 -0500 Date: Wed, 30 Nov 2016 14:45:26 +0000 From: Jonathan Wakely To: Tim Shen Cc: libstdc++ , gcc-patches Subject: Re: [PATCH] Partial solution to LWG 523 Message-ID: <20161130144526.GR3301@redhat.com> References: <20161130130324.GQ3301@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161130130324.GQ3301@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) On 30/11/16 13:03 +0000, Jonathan Wakely wrote: >On 26/11/16 16:27 -0800, Tim Shen wrote: >>diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h >>index 953aa87..2fb70b7 100644 >>--- a/libstdc++-v3/include/bits/shared_ptr_base.h >>+++ b/libstdc++-v3/include/bits/shared_ptr_base.h >>@@ -1000,7 +1000,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >> element_type& >> operator*() const noexcept >> { >>- __glibcxx_assert(_M_ptr != nullptr); >>+ __glibcxx_assert(_M_get() != nullptr); >> return *_M_get(); >> } > >Oops, thanks, but let's fix this separately (I'll do it now) so the >rest of the patch only touches regex stuff. I've fixed that with this patch, committed to trunk. commit 18ee83fae4fef2fc720ef6aef0754377e6fe29e8 Author: Jonathan Wakely Date: Wed Nov 30 13:11:50 2016 +0000 Fix condition in shared_ptr assertion 2016-11-30 Tim Shen * include/bits/shared_ptr_base.h (__shared_ptr_access::operator*()): Fix assertion. diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 953aa87..2fb70b7 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -1000,7 +1000,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION element_type& operator*() const noexcept { - __glibcxx_assert(_M_ptr != nullptr); + __glibcxx_assert(_M_get() != nullptr); return *_M_get(); }