From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A9BB93858D37; Thu, 7 Sep 2023 21:02:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9BB93858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694120531; bh=gY8V0O8eTNYz7ZnSjQ8n2Zc0X+ivChFb7a0Z3wLRj40=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SlyKpYsBDAjvk0blBFHmx9ol9gNBdvYEGBhZ+TC15GqZd7jNgHoQ5fJyZQbj1zmA+ 9fyxW74+mu9/fwHTgPsZO+xv7SOADBQ6Npd9Mpjv4KTizGSn7f+iwjIFk8Sqc3Qj+h G+4pSOTkGj+2HjC08yARdifUnRnPiCEzkBuMtC3I= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/110830] -Wanalyzer-use-of-uninitialized-value false negative due to use-after-free::supercedes_p. Date: Thu, 07 Sep 2023 21:02:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110830 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Benjamin Priour : https://gcc.gnu.org/g:7d2274b9e346f44f8f6598b9dbb9fa95259274a2 commit r14-3794-g7d2274b9e346f44f8f6598b9dbb9fa95259274a2 Author: benjamin priour Date: Fri Sep 1 20:21:41 2023 +0200 analyzer: Call off a superseding when diagnostics are unrelated [PR1108= 30] Before this patch, a saved_diagnostic would supersede another at the same statement if and only its vfunc supercedes_p returned true for the other diagnostic's kind. That both warning were unrelated - i.e. resolving one would not fix the other - was not considered in making the above choice. This patch makes it so that two saved_diagnostics taking a different outcome of at least one common conditional branching cannot supersede each other. Signed-off-by: Benjamin Priour Co-authored-by: David Malcolm Signed-off-by: David Malcolm gcc/analyzer/ChangeLog: PR analyzer/110830 * diagnostic-manager.cc (compatible_epaths_p): New function. (saved_diagnostic::supercedes_p): Now calls the above to determine if the diagnostics do overlap and the superseding may proceed. gcc/testsuite/ChangeLog: PR analyzer/110830 * c-c++-common/analyzer/pr110830.c: New test.=