From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB29A3857C4B; Thu, 11 Aug 2022 16:21:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB29A3857C4B From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/106551] [13 Regression] dup2 causes -fanalyzer ICE in valid_to_unchecked_state, at analyzer/sm-fd.cc:751 Date: Thu, 11 Aug 2022 16:21:53 +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: mir at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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: Thu, 11 Aug 2022 16:21:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106551 --- Comment #3 from CVS Commits --- The master branch has been updated by Immad Mir : https://gcc.gnu.org/g:837142257cbde3cc03ee0dacd1d7b2fb4fa48bae commit r13-2023-g837142257cbde3cc03ee0dacd1d7b2fb4fa48bae Author: Immad Mir Date: Thu Aug 11 21:45:54 2022 +0530 analyzer: fix ICE casued by dup2 in sm-fd.cc[PR106551] This patch fixes the ICE caused by valid_to_unchecked_state, at analyzer/sm-fd.cc by handling the m_start state in check_for_dup. Tested lightly on x86_64. gcc/analyzer/ChangeLog: PR analyzer/106551 * sm-fd.cc (check_for_dup): handle the m_start state when transitioning the state of LHS of dup, dup2 and dup3 call. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-dup-1.c: New testcases. * gcc.dg/analyzer/fd-uninit-1.c: Remove bogus warning. Signed-off-by: Immad Mir =