From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp004.apm-internet.net (smtp004.apm-internet.net [85.119.248.204]) by sourceware.org (Postfix) with ESMTPS id 787103858D35 for ; Wed, 13 Mar 2024 11:30:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 787103858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sandoe.co.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 787103858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.119.248.204 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710329444; cv=none; b=iUlOEpou1NtUbV6tdHZuqU/fPiWNHh8jr6AEzGXe/snxzwfnxG0zEs5SkIhvRmGaAtCor2331AsNWFvMbahpcdE+3cU689RnpMJSvnRyynabVxbGKEUKR+DqR9xL9IsaC6SEGOGkt4jB4BzMudYVTPuw0gfM+kRZMw9ORK581cA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710329444; c=relaxed/simple; bh=ry52geLuulJJPZ7sRRqi7yjV9UH7gSP7yMnFf5muAdc=; h=Mime-Version:Subject:From:Date:Message-Id:To; b=F1N2U10XDD7sp861HMb2aU9lp7jwOmHmwykvuSWhzu7oc3yySHTisDqcmu9mjJKL8bttvim8TXuxpTh0j9j4exkshI2zhRbzj27fKPuv8D3N76INUryUgAAlQWKZcH6QifEEtO0mFVKq4iXlep3LbtQBdnPTktzD4xZBHwaqbzg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: (qmail 65841 invoked from network); 13 Mar 2024 11:30:25 -0000 X-APM-Out-ID: 17103294156578 X-APM-Authkey: 257869/1(257869/1) 2 Received: from unknown (HELO smtpclient.apple) (103.55.98.161) by smtp004.apm-internet.net with SMTP; 13 Mar 2024 11:30:25 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: [PATCH] Fix libcc1plugin and libc1plugin to avoid poisoned identifiers From: Iain Sandoe In-Reply-To: <15D35FFE-1E97-4047-A75C-F13D25826E15@andric.com> Date: Wed, 13 Mar 2024 11:30:20 +0000 Cc: GCC Patches Content-Transfer-Encoding: 7bit Message-Id: References: <15D35FFE-1E97-4047-A75C-F13D25826E15@andric.com> To: Dimitry Andric X-Mailer: Apple Mail (2.3696.120.41.1.8) X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_COUK,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_NONE,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: Hi Dimitry, > On 7 Mar 2024, at 16:48, Dimitry Andric wrote: > > Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632 > > Use INCLUDE_VECTOR before including system.h, instead of directly > including , to avoid running into poisoned identifiers. I would say that the patch itself is obvious, but you have not mentioned how it was tested? thanks Iain > > Signed-off-by: Dimitry Andric > --- > libcc1/libcc1plugin.cc | 3 +-- > libcc1/libcp1plugin.cc | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc > index 72d17c3b81c..e64847466f4 100644 > --- a/libcc1/libcc1plugin.cc > +++ b/libcc1/libcc1plugin.cc > @@ -32,6 +32,7 @@ > #undef PACKAGE_VERSION > > #define INCLUDE_MEMORY > +#define INCLUDE_VECTOR > #include "gcc-plugin.h" > #include "system.h" > #include "coretypes.h" > @@ -69,8 +70,6 @@ > #include "gcc-c-interface.h" > #include "context.hh" > > -#include > - > using namespace cc1_plugin; > > > diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc > index 0eff7c68d29..da68c5d0ac1 100644 > --- a/libcc1/libcp1plugin.cc > +++ b/libcc1/libcp1plugin.cc > @@ -33,6 +33,7 @@ > #undef PACKAGE_VERSION > > #define INCLUDE_MEMORY > +#define INCLUDE_VECTOR > #include "gcc-plugin.h" > #include "system.h" > #include "coretypes.h" > @@ -71,8 +72,6 @@ > #include "rpc.hh" > #include "context.hh" > > -#include > - > using namespace cc1_plugin; > > > -- > 2.43.2 >