From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 64DB13857352; Wed, 29 Mar 2023 18:18:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64DB13857352 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680113890; bh=nbOZpihSzYRq7Nx334n7gTIxxEssKSLfgmrYTqLEPG0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QxlMZXhr4ENnCgeOZbHaLGu4TRdHwvV1iFVwayaI6cuhgcOR4zWXty9R4EZB+mjPg vbIfySAx6iamdufOtzRhsYe1Mn7hQo55xyF2UlPnjzAIloPiS1rRyECmqMohqPyRLE 7fCB7RnXwcN/XAh+NfU8a8+QoulbALqKHK8wS3oI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/106573] Missing -Wanalyzer-use-of-uninitialized-value on calls handled by state machines Date: Wed, 29 Mar 2023 18:18:09 +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: RESOLVED X-Bugzilla-Resolution: FIXED 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=3D106573 --- Comment #5 from CVS Commits --- The releases/gcc-12 branch has been updated by David Malcolm : https://gcc.gnu.org/g:62a565e56763c65ec9e134735aa780cf2b1c3cfa commit r12-9354-g62a565e56763c65ec9e134735aa780cf2b1c3cfa Author: David Malcolm Date: Wed Mar 29 14:16:46 2023 -0400 analyzer: fix missing -Wanalyzer-use-of-uninitialized-value on special-cased functions [PR106573] We were missing checks for uninitialized params on calls to functions that the analyzer has hardcoded knowledge of - both for those that are handled just by state machines, and for those that are handled in region-model-impl-calls.cc (for those arguments for which the svalue wasn't accessed in handling the call). Fixed thusly. Backported from r13-2007-gbddd8d86e3036e, dropping the test case fd-uninit-1.c. gcc/analyzer/ChangeLog: PR analyzer/106573 * region-model.cc (region_model::on_call_pre): Ensure that we c= all get_arg_svalue on all arguments. gcc/testsuite/ChangeLog: PR analyzer/106573 * gcc.dg/analyzer/error-uninit.c: New test. * gcc.dg/analyzer/file-uninit-1.c: New test. Signed-off-by: David Malcolm =