From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id C29563858D20; Thu, 14 Sep 2023 04:46:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C29563858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-99357737980so68485066b.2; Wed, 13 Sep 2023 21:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694666791; x=1695271591; darn=gcc.gnu.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=MhBwCovTTiHpvBbAEoJaWks5iLmPz7C1XKoRGQ502GM=; b=QfrulHYjHMuNVO8ARtBK1cj6cWnRnaftuDZV81dtZTdk81MbBwjgd1hqCOQtZIEcrZ 9UDqULNaEthJzJBdffmozPrQMXRJJkGkCkdm1ngHSiKsLbTubRGv0KMbEFHmjesPe0hu iSEtCq5MvK48WMjjSyCBv9Gr31eUGiqH9vakJ3DLhXYSToEEup5YaXok87xMqdQxFy8b Xte+5+dqplmvioDQ5VLlbtbKI2Bbw2bx8vyTue7Yoljhe4stebFlz/zql7JFbuzqBChu g+N34CZJV4ZittQHvzZH82lE79U/TptARpznuaHeMVRsciUC/whbRCyDaUGO1qdaw0dN apVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694666791; x=1695271591; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=MhBwCovTTiHpvBbAEoJaWks5iLmPz7C1XKoRGQ502GM=; b=hSBcu/IEhOoG4c7evOLbi1khKPJzyf5tKBExhMdT6HZygLc61UkJV0qwie8QI7rsIn mJBkoLKr8cFPj6q3/AP0mXu1ebJ4pI7htz/xvLqWt1l5TkU6zqcnAxHw3dnHGHwwGELC TrSmD5BEUZKU7WLmSy7VsBSo9tu5tmlUw1C7uAZGAhvA3HcM6o0d0zvI3Ui80ADcZuU7 b+iD4v/cqSQf4tRBgmClCTVnz7+bFrthXQBQrryBZn3cK6ky+cGA1XJK6g37WRxSYnNe lTn2Ialod3+ye4qfYtlu/4PSDR27207L5LHOnJdzIJ3AhsoA750j2xhlCLFAe5G72wpj 3d+w== X-Gm-Message-State: AOJu0YxnelhYw2ToZ9CuUUmN5B8yvnBUij5Y7LCd79CFC49FiXqDIVKX k/xrpt0glSxs/9SgD9zAyos= X-Google-Smtp-Source: AGHT+IEDJXBTVQgTZ84CMiTO3RmlJ1aB5D5829SVsK+UtgWNsFfN9jSA9na8B8ikk8GbspHqzYaMnA== X-Received: by 2002:a17:906:3f49:b0:9ad:7ec3:78b3 with SMTP id f9-20020a1709063f4900b009ad7ec378b3mr3317572ejj.34.1694666791402; Wed, 13 Sep 2023 21:46:31 -0700 (PDT) Received: from [10.37.0.54] ([89.207.171.104]) by smtp.gmail.com with ESMTPSA id gs10-20020a170906f18a00b00993b381f808sm423960ejb.38.2023.09.13.21.46.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 21:46:30 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------9UBamIAzwlD6r2HSjtLTO5Wz" Message-ID: Date: Thu, 14 Sep 2023 06:46:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11 [PR 111050] Content-Language: en-US To: Jonathan Wakely Cc: rs2740@gmail.com, libstdc++ , gcc-patches References: From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= In-Reply-To: X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------9UBamIAzwlD6r2HSjtLTO5Wz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Author: TC Date:   Wed Sep 6 19:31:55 2023 +0200     libstdc++: Force _Hash_node_value_base methods inline to fix abi (PR111050) https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1b6f0476837205932613ddb2b3429a55c26c409d     changed _Hash_node_value_base to no longer derive from _Hash_node_base, which means     that its member functions expect _M_storage to be at a different offset. So explosions     result if an out-of-line definition is emitted for any of the member functions (say,     in a non-optimized build) and the resulting object file is then linked with code built     using older version of GCC/libstdc++.     libstdc++-v3/ChangeLog:             PR libstdc++/111050             * include/bits/hashtable_policy.h             (_Hash_node_value_base<>::_M_valptr(), _Hash_node_value_base<>::_M_v())             Add [[__gnu__::__always_inline__]]. Ok to commit ? On 12/09/2023 18:09, Jonathan Wakely wrote: > On Mon, 11 Sept 2023 at 18:19, François Dumont wrote: >> >> On 11/09/2023 13:51, Jonathan Wakely wrote: >>> On Sun, 10 Sept 2023 at 14:57, François Dumont via Libstdc++ >>> wrote: >>>> Following confirmation of the fix by TC here is the patch where I'm >>>> simply adding a 'constexpr' on _M_next(). >>>> >>>> Please let me know this ChangeLog entry is correct. I would prefer this >>>> patch to be assigned to 'TC' with me as co-author but I don't know how >>>> to do such a thing. Unless I need to change my user git identity to do so ? >>> Sam already explained that, but please check with Tim how he wants to >>> be credited, if at all. He doesn't have a copyright assignment, and >>> hasn't added a DCO sign-off to the patch, but it's small enough to not >>> need it as this is the first contribution credited to him. >>> >>> >>>> libstdc++: Add constexpr qualification to _Hash_node::_M_next() >>> What has this constexpr addition got to do with the ABI change and the >>> always_inline attributes? >>> >>> It certainly doesn't seem like it should be the summary line of the >>> git commit message. >> Oops, sorry, that's what I had started to do before Tim submitted anything. >> >> Here is latest version: > No patch attached, and the ChangeLog below still mentions the constexpr. > > I've pinged Tim via another channel to ask him about the author attribution. > > >> Author: TC >> Date: Wed Sep 6 19:31:55 2023 +0200 >> >> libstdc++: Force inline on _Hash_node_value_base methods to fix abi >> (PR111050) >> >> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1b6f0476837205932613ddb2b3429a55c26c409d >> changed _Hash_node_value_base to no longer derive from >> _Hash_node_base, which means >> that its member functions expect _M_storage to be at a different >> offset. So explosions >> result if an out-of-line definition is emitted for any of the >> member functions (say, >> in a non-optimized build) and the resulting object file is then >> linked with code built >> using older version of GCC/libstdc++. >> >> libstdc++-v3/ChangeLog: >> >> PR libstdc++/111050 >> * include/bits/hashtable_policy.h >> (_Hash_node_value_base<>::_M_valptr(), >> _Hash_node_value_base<>::_M_v()) >> Add [[__gnu__::__always_inline__]]. >> (_Hash_node<>::_M_next()): Add constexpr. >> >> Co-authored-by: François Dumont >> >> Ok for you TC (Tim ?) ? >> >> --------------9UBamIAzwlD6r2HSjtLTO5Wz Content-Type: text/x-patch; charset=UTF-8; name="pr111050.patch" Content-Disposition: attachment; filename="pr111050.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpYnN0ZGMrKy12My9pbmNsdWRlL2JpdHMvaGFzaHRhYmxlX3BvbGlj eS5oIGIvbGlic3RkYysrLXYzL2luY2x1ZGUvYml0cy9oYXNodGFibGVfcG9saWN5LmgKaW5k ZXggMzQ3ZDQ2OGVhODYuLjg2YjMyZmIxNWYyIDEwMDY0NAotLS0gYS9saWJzdGRjKystdjMv aW5jbHVkZS9iaXRzL2hhc2h0YWJsZV9wb2xpY3kuaAorKysgYi9saWJzdGRjKystdjMvaW5j bHVkZS9iaXRzL2hhc2h0YWJsZV9wb2xpY3kuaApAQCAtMzI3LDE4ICszMjcsMjIgQEAgbmFt ZXNwYWNlIF9fZGV0YWlsCiAKICAgICAgIF9fZ251X2N4eDo6X19hbGlnbmVkX2J1ZmZlcjxf VmFsdWU+IF9NX3N0b3JhZ2U7CiAKKyAgICAgIFtbX19nbnVfXzo6X19hbHdheXNfaW5saW5l X19dXQogICAgICAgX1ZhbHVlKgogICAgICAgX01fdmFscHRyKCkgbm9leGNlcHQKICAgICAg IHsgcmV0dXJuIF9NX3N0b3JhZ2UuX01fcHRyKCk7IH0KIAorICAgICAgW1tfX2dudV9fOjpf X2Fsd2F5c19pbmxpbmVfX11dCiAgICAgICBjb25zdCBfVmFsdWUqCiAgICAgICBfTV92YWxw dHIoKSBjb25zdCBub2V4Y2VwdAogICAgICAgeyByZXR1cm4gX01fc3RvcmFnZS5fTV9wdHIo KTsgfQogCisgICAgICBbW19fZ251X186Ol9fYWx3YXlzX2lubGluZV9fXV0KICAgICAgIF9W YWx1ZSYKICAgICAgIF9NX3YoKSBub2V4Y2VwdAogICAgICAgeyByZXR1cm4gKl9NX3ZhbHB0 cigpOyB9CiAKKyAgICAgIFtbX19nbnVfXzo6X19hbHdheXNfaW5saW5lX19dXQogICAgICAg Y29uc3QgX1ZhbHVlJgogICAgICAgX01fdigpIGNvbnN0IG5vZXhjZXB0CiAgICAgICB7IHJl dHVybiAqX01fdmFscHRyKCk7IH0K --------------9UBamIAzwlD6r2HSjtLTO5Wz--