Message ID | 20230503021713.1146069-1-tchaikov@gmail.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1026314vqo; Tue, 2 May 2023 19:19:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4IdeZsHEVP3ePhzNqvGjPEZ2f89Nr9dbMZlrix8Q1NsBqwNB1WVAbZTAMrB990OXANcGvm X-Received: by 2002:aa7:c2c7:0:b0:50b:c69a:da36 with SMTP id m7-20020aa7c2c7000000b0050bc69ada36mr6991840edp.12.1683080343538; Tue, 02 May 2023 19:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683080343; cv=none; d=google.com; s=arc-20160816; b=DQqNeWOx9sZ+vs4hSGQztZRWvJX5sC2aptlmF4TnBiuxr7AfaD287Gi4MuoOYUEEyh vo789FpPEC3t3Dy4oKXpYLrlOqG8hKu9g4kKiZACR/lT6OeuKVQhem9/A5KOB4n4+TKj UCjNdhhjrsvO0um9wwIE2PUYbdcfMNfMd7bbuR+sXu60KIUXWlBBmRgdlWyiiFTcI0sD Hc52CICIAEKAOQ+TWsvO8LFkSNd/AX4Znj45OYFM7qRLQGhCdOTxWzvXSJ8stYli4AFH 2d1JhU9e3iRmHYkRlEFc5zpj4Obl+OmAJCF0W6Rm0sBxsYm7h4KPjmd9MYgDXzbrWkw2 AuVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=W7GDjvk3IIig/WCC7ZJ7ZW3zr7FhMQdBj9MnCmK0dD8=; b=kTaFQTtre+HMetHWxmdqvmdnigrNkyksGfJBJf/KoPgUef5cB0vxb+eMtzq8UmoGF3 6pZh0IJq3p/CIPI0qGuAo4oQrx1cWq7pVe4HjWtnV2rboROTKM0IuvL62XNvpVdQM4B/ BL+YWC/lKbn95FGVKQbSp3qx11y4K1YdlmkOV11kFCgEzTc0UAFGSoyQpS9wps/D9O45 Yi/v86JA6/+gDfbJHKz8oDuz/DtxZzpwRXUemmCpOxq9LBA79E1XOw70VZRAnRURATnh 3ytrZN2g7HAtRyKQYLiQ3DJJHw5Owx8WfT92PigRp0yxzyea7pUwR9wZqhB59UuhpN8d 5SOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=PKg1Sz3g; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x10-20020aa7d6ca000000b0050bcd1f3b05si304328edr.105.2023.05.02.19.19.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 19:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=PKg1Sz3g; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1D8743856944 for <ouuuleilei@gmail.com>; Wed, 3 May 2023 02:18:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D8743856944 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683080292; bh=W7GDjvk3IIig/WCC7ZJ7ZW3zr7FhMQdBj9MnCmK0dD8=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=PKg1Sz3g5XfyH58r/xHAfbzdCxf6K04FbFGnRgPgB9awVUj1OVioABALyHVzqbmib Zhl2+7kcC1JYUMVmPSBIbXI+amsni4TjzclVonvPBTjK3TQMdIvpL+j5KU/V86XiFm nSG1/Ca74tquoIQ7oF5KDLBLlgpz0dJhNnbQGi9A= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 12DC33858D1E; Wed, 3 May 2023 02:17:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 12DC33858D1E Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-63b4bf2d74aso3275206b3a.2; Tue, 02 May 2023 19:17:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683080246; x=1685672246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W7GDjvk3IIig/WCC7ZJ7ZW3zr7FhMQdBj9MnCmK0dD8=; b=HWwMh21irfzGus3R2MpsWjb0ceQe+I9/knTvRf6CsHseTa0e8htACDd3a2+zBisw1i IeGNBr+XgEcBwdWZ5/YtTR6GtQ76XRn0ICElvp26IeeP77HBfqV7AoEMOSurf/9W7AWv ESzztyN0NfsXGKVFc9v75g/9KWgMbEkc7Lzr+ygAl7ZSHEPGuIl9vgSGOKxWWygGOxIV l2HCvZqQQNZbi4AEr/YzE6P+BNz1/rmq8kzuxnibMnwP2dAzUkYM+wkNP4kigY6r9CCj 2rrxgF463YUgKFefsChKg5mX1S4iOn+rZPXwAruOBi/udBohT/brKoQ2K5InzW7IQKdm c9bg== X-Gm-Message-State: AC+VfDzjM1PQOOiFCGbmku8Sy8UfgxAe0dCnUsB0EuR6pQmeDklCCvaT Gd7a1hDGu5rq1WR4Gn9VriiXYSwA4Nm//A== X-Received: by 2002:a05:6a00:848:b0:63b:7af1:47c9 with SMTP id q8-20020a056a00084800b0063b7af147c9mr30500681pfk.13.1683080245582; Tue, 02 May 2023 19:17:25 -0700 (PDT) Received: from localhost.localdomain ([101.93.160.94]) by smtp.gmail.com with ESMTPSA id a15-20020a056a000c8f00b0063b8ddf77f7sm22452912pfv.211.2023.05.02.19.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 19:17:25 -0700 (PDT) To: libstdc++@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org, Kefu Chai <tchaikov@gmail.com> Subject: [PATCH v2 0/1] Set _M_string_length before calling _M_dispose() Date: Wed, 3 May 2023 10:17:12 +0800 Message-Id: <20230503021713.1146069-1-tchaikov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230501070622.847749-2-tchaikov@gmail.com> References: <20230501070622.847749-2-tchaikov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_ABUSEAT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Kefu Chai via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Kefu Chai <tchaikov@gmail.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764837653860966093?= X-GMAIL-MSGID: =?utf-8?q?1764837653860966093?= |
Series |
Set _M_string_length before calling _M_dispose()
|
|
Message
kefu chai
May 3, 2023, 2:17 a.m. UTC
Hi Jonathan, Thank you for your review and suggestion. The change looks great! Assigning a value with an immediate zero is indeed much faster. in v2: * revised the commit message a little bit, I found it a little bit difficult to parse when re-reading it. * associated the commit with PR/libstdc++/109703. as I just filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109706, which turns out to be a dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109703 The rest of the v2 patch is identical to the one attached in your reply. Would you please taking another look? Kefu Chai (1): libstdc++: Set _M_string_length before calling _M_dispose() [PR109703] libstdc++-v3/include/bits/basic_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, 3 May 2023 at 03:17, Kefu Chai via Libstdc++ <libstdc++@gcc.gnu.org> wrote: > Hi Jonathan, > > Thank you for your review and suggestion. The change looks great! > Assigning a value with an immediate zero is indeed much faster. > > in v2: > > * revised the commit message a little bit, I found it a little bit > difficult to parse when re-reading it. > * associated the commit with PR/libstdc++/109703. as I just filed > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109706, which turns out > to be a dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109703 > > The rest of the v2 patch is identical to the one attached in your reply. > > Would you please taking another look? > Thanks. I've pushed it to trunk as cbf6c7a1d16490a1e63e9a5ce00e9a5c44c4c2f2 and will backport it too. I altered the commit msg again, because "input_iterator" is a C++20 concept, and here we're just talking about types meeting the old C[[17InputIterator requirements, not types modelling the concept. I also added references to the commit and PR that added the __builtin_unreachable(). > Kefu Chai (1): > libstdc++: Set _M_string_length before calling _M_dispose() [PR109703] > > libstdc++-v3/include/bits/basic_string.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > -- > 2.40.1 > >
Le mer. 3 mai 2023 à 20:22, Jonathan Wakely <jwakely@redhat.com> a écrit : > > > On Wed, 3 May 2023 at 03:17, Kefu Chai via Libstdc++ < > libstdc++@gcc.gnu.org> wrote: > >> Hi Jonathan, >> >> Thank you for your review and suggestion. The change looks great! >> Assigning a value with an immediate zero is indeed much faster. >> >> in v2: >> >> * revised the commit message a little bit, I found it a little bit >> difficult to parse when re-reading it. >> * associated the commit with PR/libstdc++/109703. as I just filed >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109706, which turns out >> to be a dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109703 >> >> The rest of the v2 patch is identical to the one attached in your reply. >> >> Would you please taking another look? >> > > Thanks. I've pushed it to trunk as > cbf6c7a1d16490a1e63e9a5ce00e9a5c44c4c2f2 and will backport it too. > > I altered the commit msg again, because "input_iterator" is a C++20 > concept, and here we're just talking about types meeting the old > C[[17InputIterator requirements, not types modelling the concept. I also > added references to the commit and PR that added the > __builtin_unreachable(). > Awesome! The commit message is much better now. Thank you very much for your help! > > >> Kefu Chai (1): >> libstdc++: Set _M_string_length before calling _M_dispose() [PR109703] >> >> libstdc++-v3/include/bits/basic_string.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> -- >> 2.40.1 >> >> -- Regards Kefu Chai