From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C8BDA3858024; Thu, 8 Jun 2023 09:50:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8BDA3858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686217858; bh=Vc2nFWdsKhpJ3tkVWgnix32lk9FEWawu/QlrdjswIp4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ita8LXLHKxa1digSkh/QwzNrYyf5eU9CVUAGti/Mh1I5WmwyxbNylWZoBErNJBZBj pP/5Z+e39CQxh4Jmuj6pMvgrNNe8WjndnwWsifhB0SLVPrqST+dgHr90jAOw6ickYS ewZHPuYI+nD4CFOZzLc3zGjTSrhHtU6PRTtmpQ6U= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/109439] RFE: Spurious -Wanalyzer-use-of-uninitialized-value tagging along -Wanalyzer-out-of-bounds Date: Thu, 08 Jun 2023 09:50:57 +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: 13.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: vultkayn 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=3D109439 --- Comment #2 from CVS Commits --- The trunk branch has been updated by Benjamin Priour : https://gcc.gnu.org/g:9589a46ddadc8b93c224c3f84fa94746c04596bf commit r14-1632-g9589a46ddadc8b93c224c3f84fa94746c04596bf Author: Benjamin Priour Date: Thu Jun 8 11:38:08 2023 +0200 analyzer: Standalone OOB-warning [PR109437, PR109439] This patch enhances -Wanalyzer-out-of-bounds that is no longer paired with a -Wanalyzer-use-of-uninitialized-value on out-of-bounds-read. This also fixes PR analyzer/109437. Before there could always be at most one OOB-read warning per frame bec= ause -Wanalyzer-use-of-uninitialized-value always terminates the analysis path. PR 109439 gcc/analyzer/ChangeLog: * bounds-checking.cc (region_model::check_symbolic_bounds): Ret= urns whether the BASE_REG region access was OOB. (region_model::check_region_bounds): Likewise. * region-model.cc (region_model::get_store_value): Creates an unknown svalue on OOB-read access to REG. (region_model::check_region_access): Returns whether an unknown svalue needs be created. (region_model::check_region_for_read): Passes check_region_acce= ss return value. * region-model.h: Update prior function definitions. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/out-of-bounds-2.c: Cleaned test for uninitialized-value warning * gcc.dg/analyzer/out-of-bounds-5.c: Likewise. * gcc.dg/analyzer/pr101962.c: Likewise. * gcc.dg/analyzer/realloc-5.c: Likewise. * gcc.dg/analyzer/pr109439.c: New test.=