From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by sourceware.org (Postfix) with ESMTPS id 8A9443858C31 for ; Wed, 13 Mar 2024 12:10:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A9443858C31 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=andric.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andric.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8A9443858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=87.251.56.140 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710331846; cv=none; b=lcJZmFPETykBH8YpU6hyEIsrB4m89GqI1GmVl4few1qBXe4Z0xN1GIFGVjX8WqXk1YVZ+K05hfozwrM//GaxENZfNCoWcPg97rFth/dbS6YypMFDoGqS2P2dflA4w3pr5SvMGF9TVJGe4njsyIH2xuJpTCze4IjK5Nl718IMDn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710331846; c=relaxed/simple; bh=3vvXgK9pRASgPjecCkLZsJbJ6iiypGC+tcAPDd0Relg=; h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To; b=qp9Sd8tPB5e2hDnOhIMJECNT0XnKmWp+bUTyoApoc7CqWW28aQONf6IAuLXgj0o9G/Mh7+I56FHS4XuaXXRnJPB944wYQwlU8EZ8956Uirkr44XM1IpCm4kNpYf8RMvoimd7Cgr0Sw+Tzqh2SdCTVuH5yPvdGBibSTyJUD9B8Eo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EB20D53069; Wed, 13 Mar 2024 13:10:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=andric.com; s=201904; t=1710331842; bh=3vvXgK9pRASgPjecCkLZsJbJ6iiypGC+tcAPDd0Relg=; h=Subject:From:In-Reply-To:Date:Cc:Message-Id:References:To:From; b=Jvy+auAnxrJTzduP+PddiYGeLDviFHB9wCgxV8PORNPYLGSKfunsbWmaiNK7zFoLS kLuOkMn0l+WREpG7KGS92ZLcD8tbJ1ZgL4lzTAz1WYvailNUjIUXYptYDHo0wP9iNq EMYW8/ChWcJ+cxP6XHSwcP289qoNihAw1/vbhMjZ+7PUvbOt81LDHiq1YiuEyEIgmY yZLq1xpIRUrSriMGZbZEoUhTbJEHNdUALpkEUurthIYm00mljI+wBxaXCqWzq75GIl LUb50Py3wXPapBeLtlnvhXHXOeUr3hAeF26QKmiFuLWecXi73alX50VzHCJTLfY1jK K/lt7Gx92eGSg== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Subject: Re: [PATCH] Fix libcc1plugin and libc1plugin to avoid poisoned identifiers From: Dimitry Andric In-Reply-To: Date: Wed, 13 Mar 2024 13:10:42 +0100 Cc: GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: <06120356-49F7-4A4A-AA99-33ECEB30E272@andric.com> References: <15D35FFE-1E97-4047-A75C-F13D25826E15@andric.com> To: Iain Sandoe X-Mailer: Apple Mail (2.3731.700.6.1.1) X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 13 Mar 2024, at 12:30, Iain Sandoe wrote: >=20 >> On 7 Mar 2024, at 16:48, Dimitry Andric wrote: >>=20 >> Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111632 >>=20 >> Use INCLUDE_VECTOR before including system.h, instead of directly >> including , to avoid running into poisoned identifiers. >=20 > I would say that the patch itself is obvious, but you have not = mentioned how > it was tested? This was tested by doing a --disable-bootstrap build, on a FreeBSD system where llvm-project's libc++ is the default C++ library (specifically 15.0-CURRENT, which has llvm-project 17.0.6), against both the lang/gcc14-devel port, and against gcc master as of gcc-14-9346-g74e8cc28eda. This also required gcc-14-9360-g9970b576b7e to be applied, before it was committed to master. Note that if you do a fully bootstrapped build, there aren't any compile errors, since it will compile the plugins against a freshly built libstdc++: it has already transitively included via other standard headers, so the #include statement after #include "system.h" effectively does nothing, and won't run into poisoned identifiers. You would only get compile errors on those poisoned identifiers with the non-bootstrapped, single-stage build which compiles everything against the host system's C++ headers. -Dimitry