From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3F0E63856240 for ; Wed, 3 May 2023 12:22:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3F0E63856240 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683116543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OqRewNMP0+AnfpMxkdX5a8fv6jZQV/UMeC5sDSkDMQc=; b=LlFQhv5BQPC2/GYG4oMFDSkOtvVmSsehUFYl+Oy/m9yUIs00l7KYvDvRhC/5p92rDwtaXV YM2dh7RZMLnEyUmQ8d1tCLU68V/wDyreQ6JhwneL1JmW+CZP9pAPNbQ9owRA8cwJE+1Li7 Psayoy9IC1CbImGs7j56xzpY6A0KP8o= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-elkxtBN9PCyMUK3JuNToTA-1; Wed, 03 May 2023 08:22:22 -0400 X-MC-Unique: elkxtBN9PCyMUK3JuNToTA-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2a8b207f2c8so24188661fa.0 for ; Wed, 03 May 2023 05:22:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683116541; x=1685708541; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OqRewNMP0+AnfpMxkdX5a8fv6jZQV/UMeC5sDSkDMQc=; b=Z95iDvjpYoOW2qcp6vz6oGPsg/cdxt88fRSp4vfQT4+/1255QE2xOeoZKCGgTDjuPA mg7KLSL6bt4OU3SzkpDopiWJymRUjOu5m7xcJlOXWbx9PWr39k3pL2plc/eRh/WfTg+1 3teD7DWh4CZL9+0C4ApJYLTVEkuPphu2S3ucoL/hjc1ppxDCLcrC+cxbU5jtaTzTZ8b9 Df6Hrv4hR3s7c9pM7quVoVNl8ttX03oE/+pWic3Y3SqJS75NjVT7H+E75jiFNk3+kjfZ naFuNa8VHkt2IDXfUR88T0Semn5FQcsfD7cGBAGKsAZQbynIXllPeKytk0yjbi6GcZEk YLxw== X-Gm-Message-State: AC+VfDwSXUyQzw1ItJY0iG9pWmmU5vVaPKbjrY7Q3CVlyStuCVjspsyz 6q7N4DlpZmoSZJDhHELsXZhL5IXkyY4JSAgSuSUv+2QDZK6DbxtwmXRUSJSeLsfGUZNXGDEKey0 s5OtyOSbx3f3n5S/ro7CspICtjO9gf9zidw== X-Received: by 2002:a05:651c:154:b0:2a8:e7f9:c33f with SMTP id c20-20020a05651c015400b002a8e7f9c33fmr5729725ljd.30.1683116540824; Wed, 03 May 2023 05:22:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Qf8xCz1Pdfta1B0eezB8QE+g0mPrc2atY6kfh4APMQYdXrifQApRVZipBCtxOmUWdwt8qMfnBITQQRyAiSlE= X-Received: by 2002:a05:651c:154:b0:2a8:e7f9:c33f with SMTP id c20-20020a05651c015400b002a8e7f9c33fmr5729721ljd.30.1683116540459; Wed, 03 May 2023 05:22:20 -0700 (PDT) MIME-Version: 1.0 References: <20230501070622.847749-2-tchaikov@gmail.com> <20230503021713.1146069-1-tchaikov@gmail.com> In-Reply-To: <20230503021713.1146069-1-tchaikov@gmail.com> From: Jonathan Wakely Date: Wed, 3 May 2023 13:22:09 +0100 Message-ID: Subject: Re: [PATCH v2 0/1] Set _M_string_length before calling _M_dispose() To: Kefu Chai Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="00000000000082937105fac91b78" X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000082937105fac91b78 Content-Type: text/plain; charset="UTF-8" On Wed, 3 May 2023 at 03:17, Kefu Chai via Libstdc++ 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 > > --00000000000082937105fac91b78--