From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id E7DF3385840F for ; Fri, 28 Jan 2022 12:16:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E7DF3385840F Received: by mail-ej1-x62a.google.com with SMTP id s5so15441096ejx.2 for ; Fri, 28 Jan 2022 04:16:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L2lMllJXSqCE0LPi0P33dsLW/rZ0VSr4VXAoA7mKM4o=; b=XWyfRo5oq+SsDhGEW8bWLliLex0z5XvpyEB5MrGNU8mjFfc3md2bJlk7qdlRKf3Zcw XICYHIaZExDtEu1fLXp+X9aLir9peZCfBBhlVo2O5cy+bn2LacIcoRKQ5MZTz28JmKZt 4NLQIKWg2uN+VZAfVzMPpuA+afY74O4EjrUCIAFUR0Vak9+PAoZas91zmydj2shFvoNQ y2v4fHTjKZzD50LzQHbkBz72n7iyoo8iIo8cezmnUFCqSBPrtRffii9dothNdFtnd5Dv sdw3WfF1F+Ptgffq0adHKdsMPYhB2hoSjziZuCnCH+XsFuax/5rM8/y1ukoDovRJ1OQP QEdw== X-Gm-Message-State: AOAM531hsUGHUZsbvwYkJA9uH2yeA8j3RIfoBF4DZ4He6z1Jv81+q4lS EerAY7r/ClcHZfmEwE568BKuMb2AtO0AbPsIaxI= X-Google-Smtp-Source: ABdhPJy2nA3G4xR5mJcH/aVZ2g569rgXhfZP1lBjrx09COx94LJWkdnRgBgm1c5rBiDmHvFGuNdwE34gFHgs3Ob9m+4= X-Received: by 2002:a17:907:7ba2:: with SMTP id ne34mr3786439ejc.445.1643372160682; Fri, 28 Jan 2022 04:16:00 -0800 (PST) MIME-Version: 1.0 References: <91beddcc-1d69-48f4-24ee-4dfed823f59a@gmail.com> In-Reply-To: <91beddcc-1d69-48f4-24ee-4dfed823f59a@gmail.com> From: Richard Biener Date: Fri, 28 Jan 2022 13:15:49 +0100 Message-ID: Subject: Re: [PATCH] constrain PHI handling in -Wuse-after-free (PR104232) To: Martin Sebor Cc: gcc-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2022 12:16:05 -0000 On Thu, Jan 27, 2022 at 7:58 PM Martin Sebor via Gcc-patches wrote: > > The indiscriminate PHI handling by -Wuse-after-free has caused > the false positive reported in PR 104232. The attached patch > refines the handling to only consider PHIs all of whose operands > refer to the same object and disregard the rest. > > Tested on x86_64-linux and by compiling a few toolchain projects, > including Glibc and Binutils/GDB, to verify the absence of false > positives. OK. > Martin