From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B8DDB3857BBE; Fri, 22 Jul 2022 23:52:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8DDB3857BBE From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/106413] State explosion on va_arg when va_start is in top-level function of analysis Date: Fri, 22 Jul 2022 23:52:59 +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: ASSIGNED 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2022 23:52:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106413 --- Comment #2 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:6d5194a10dc103031b9c8a03091ca70f6db33c8b commit r13-1807-g6d5194a10dc103031b9c8a03091ca70f6db33c8b Author: David Malcolm Date: Fri Jul 22 19:50:54 2022 -0400 analyzer: fix state explosion on va_arg [PR106413] Fix state explosion on va_arg when the call to va_start is in the top-level function of the analysis. gcc/analyzer/ChangeLog: PR analyzer/106413 * varargs.cc (region_model::impl_call_va_start): Avoid iterating through non-existant variadic arguments by initializing the impl_region to "UNKNOWN" if the va_start occurs in the top-level function to the analysis. gcc/testsuite/ChangeLog: PR analyzer/106413 * gcc.dg/analyzer/torture/stdarg-4.c: New test. Signed-off-by: David Malcolm =