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.129.124]) by sourceware.org (Postfix) with ESMTPS id 53185385771E for ; Thu, 11 Jan 2024 12:27:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 53185385771E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 53185385771E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704976039; cv=none; b=dbrp5wVOzCSCHvhQfnF9yoiBwUqio809MpImiIThQcJCbEI1GCqaLPeaJEI4w3ywEYGNarhSS1hiSWRJpnltqk2RbnyaedpbVTaq0jZ7kfr8bJRBKsIKU2tNT8HnCh8xRE4i6A/Xhklq5wI1nhvqgh+sYnKNr8A8+U/Vnj8I7qU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704976039; c=relaxed/simple; bh=WnDdNjCfCQE/CwyqUTHIVNFDggdd8Llbu5BBA8HyqbA=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Vok5c86YD17JXvYq8w0f6ezG+uvMTyGHzhfq4D/HOSpB9uGmXRKo1gVAtaK8cawKwjZDxzd9ftDPgHC6F/TY6ulDIYTXxUw6GujjR9VO0ntddf54v00nZ/oYbEGh7SzH+hU+KQ+Y3VDSGCzHYTlaQmm7YxLp3KRd15oCuRsPL6I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704976036; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q3AxQiAqGNR/KfraTrbfLzyEmuvw17jYiAtvKkkyxCU=; b=fqLK5QUm0FuZXYlmK8HlteKfdVcx6VmX+TyzvSoRaRRFQ729NDlqLR1HcQcBjlUzWFvXUV ZgmX9+7iqjKqX7+WdE8ivDiscZ4r6WSE8X5sagSGf/uyccABgWxHWvl1+qMkc8UqyctC2N PODbmfzcjhdfReNChh3IJ+4BFa4yIQM= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-yAOENZQyNYGQvsoZLaQ0CA-1; Thu, 11 Jan 2024 07:27:13 -0500 X-MC-Unique: yAOENZQyNYGQvsoZLaQ0CA-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-5efb07ddb0fso76231087b3.0 for ; Thu, 11 Jan 2024 04:27:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704976033; x=1705580833; h=content-transfer-encoding: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=q3AxQiAqGNR/KfraTrbfLzyEmuvw17jYiAtvKkkyxCU=; b=hU4t+H2VXpPmMnzWF5wTjmPNBkJBAFCEvutJC61vCASqx0KOIlg69W8oCdOrg2L2tP /DD3nHgiCM4Bg99oBglJnXV3x9/pzYWSUx/SL8bmotNVg0lLCk9IQ3Wqb7liUbBg2I2x 7vyTMydpu66icU3uXyQLQBHIBzqe4G+jO4mwssvZZnY+kUaoExtSATZhezq+SS4RBigA UnfR6RfAwz0E42g7jMeqjzshS9dLTKLw4XkupBugSRAJsDVo1sISj0RU/YAo9tKPDelu e8pQqNVUPI+vnUXpRgIF9mN00iqwoEkakXgx+b1R+IgiNIAgGOTa1wFdflba6dNCX6rI FWvA== X-Gm-Message-State: AOJu0YxajqBvwjUQofdz+E/cZLR2xeABB6a/zRxzeTm+N+rHaXiyyOQ0 bBndur6o82LPNsY++nLAiybigMCUnlwwD9SoJxY6a1UwkGJd7MYlH/TYLz3Y2W1vC4EjkcT4GXd H3tQLS/EKpllt348A2vNoJ8b89W5vTwL8mYUb2ReDeoFBDBo= X-Received: by 2002:a0d:cc09:0:b0:5ef:524c:7b70 with SMTP id o9-20020a0dcc09000000b005ef524c7b70mr353283ywd.5.1704976033181; Thu, 11 Jan 2024 04:27:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwOjJlHrgotoaGyEyr6Q0q29rn7c6ew5zilfM8+gM4CZAA2Y4B0TDNKTb5kofUPoNL1chBCfBAnbzBKOjVABw= X-Received: by 2002:a0d:cc09:0:b0:5ef:524c:7b70 with SMTP id o9-20020a0dcc09000000b005ef524c7b70mr353279ywd.5.1704976032889; Thu, 11 Jan 2024 04:27:12 -0800 (PST) MIME-Version: 1.0 References: <20240111062222.525186-1-kmatsui@gcc.gnu.org> <20240111094038.876653-1-kmatsui@gcc.gnu.org> <2wigagpsd7hvcrkft6hqffegnbkwpjuzhc6kokr4ehc5usvvim@c4mck6frsns7> <4i7sjtjkkwicppyo7qzxc5z2sww7jismue33ialoorkcn42edq@be3pts47rrao> In-Reply-To: From: Jonathan Wakely Date: Thu, 11 Jan 2024 12:26:57 +0000 Message-ID: Subject: Re: Backporting [was Re: [PATCH v2 1/2] libstdc++: Fix error handling in filesystem::equivalent [PR113250]] To: Ken Matsui Cc: gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: On Thu, 11 Jan 2024 at 12:23, Ken Matsui wrote: > > On Thu, Jan 11, 2024 at 3:45=E2=80=AFAM Ken Matsui wrote: > > > > On Thu, 11 Jan 2024 at 11:14, Jonathan Wakely wrot= e: > > > On Thu, 11 Jan 2024 at 10:56, Ken Matsui wrote: > > > > > > > > On Thu, 11 Jan 2024 at 10:46, Jonathan Wakely = wrote: > > > > > On Thu, 11 Jan 2024 at 09:43, Ken Matsui wr= ote: > > > > > > > > > > > > This patch made std::filesystem::equivalent correctly throw an = exception > > > > > > when either path does not exist as per [fs.op.equivalent]/4. > > > > > > > > > > Thanks, OK for trunk and all active branches (let me know if you = need > > > > > help backporting it). > > > > > > > > > > > > > Thank you for your review as always! I do not know how to backport= this > > > > to the active branches. I think the following page is explaining i= t, > > > > but I am not sure how I can know all the active branches. > > > > > > > > https://gcc.gnu.org/wiki/GitCookbook#backport > > > > > > Supported releases are listed on the front page at gcc.gnu.org, the > > > active branches are currently releases/gcc-11, releases/gcc-12 and > > > releases/gcc-13. > > > > > > > > > > > Do we basically want to git checkout & gcc-backport for each branch > > > > after this patch is committed to the trunk? > > > > > > Almost. I use gcc-backport for the newest release branch > > > (releases/gcc-13) and then I just use 'git cherry-pick' to cherry-pic= k > > > the gcc-13 commit onto gcc-12, and then cherry-pick the gcc-12 commit > > > onto gcc-11. > > > > > > The reason for this is that there might be some changes needed on a > > > branch, either to resolve conflicts, or because of other differences > > > on the branch. e.g. when I did 'git gcc-backport 74a0dab18292be' to > > > backport that to gcc-13 I had to remove the changes to > > > include/bits/version.* and edit include/std/version instead (because > > > we do feature test macros differently on trunk). > > > > > > If I then wanted to backport it to gcc-12 and I just did 'git > > > gcc-backport 74a0dab18292be' again in the gcc-12 branch, I would have > > > to resolve the same conflicts again. If I do 'git cherry-pick > > > c5ef02e5629f8c' instead (using the hash of the commit on the gcc-13 > > > branch) then it will apply cleanly to gcc-12, because I'm using the > > > commit that already has the conflicts resolved. > > > > > > Then if I want to backport to gcc-11 as well, use cherry-pick with th= e > > > hash from the gcc-12 branch. > > > > > > This way any fixes that were needed for branch N-1 will get backporte= d > > > to N-2 as well. Sometimes this doesn't matter, e.g. the trunk commit > > > might apply cleanly to every branch. But sometimes the commit needs > > > slightly more massaging to apply to each older branch, so doing it > > > trunk->13 then 13->12 then 12->11 tends to work better. > > > > > > The reason I use cherry-pick after the first backport (instead of > > > gcc-backport every time) is because I don't want a second "(cherry > > > picked from commit ...)" line to be added to the commit message. > > > That's added by gcc-backport (by using cherry-pick -x) but we only > > > need to add it once to be able to track the provenance of the > > > backport, to know which trunk patch was backported. > > > > > > If cherry picking a backport fails and creates a mess of conflicts an= d > > > you just want to give up and start again, 'git cherry-pick --abort' > > > will undo the changes and leave the working tree clean again. This > > > works whether you use gcc-backport or cherry-pick (because > > > gcc-backport just uses cherry-pick). > > > > > > > Thank you for the detailed explanation! I think I was able to backport > > the patch to the active branches. > > > > For the Bugzilla issue, should I update the status to RESOLVED? Or > does someone else handle this? Also, are there other things I should > do about this issue? > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113250 Yes, please close as RESOLVED FIXED and set the target milestone to the first release with the fix, which will be 11.5 In cases like this where the fix is backported to multiple release branches I also add a comment to say "fixed in 11.5, 12.4, 13.3" because otherwise just setting the target milestone to 11.5 doesn't tell you about the other branches. It's also nice to thank the reporter for filing it, especially when they identify the root cause and suggest a fix. And thank you for taking care of it!