From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8077E3858CDB; Sun, 14 Aug 2022 20:27:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8077E3858CDB From: "tlange 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: Sun, 14 Aug 2022 20:27:02 +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: tlange 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: cc 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: Sun, 14 Aug 2022 20:27:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106551 Tim Lange changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tlange at gcc dot gnu.org --- Comment #4 from Tim Lange --- Hi Immad, while testing my patch on coreutils [1], I encountered another ICE at the s= ame line. I'm using the newest commit on the master at the time of writing this= [2] (I've double-checked that I indeed have your fix included). during IPA pass: analyzer ../lib/freopen.c: In function 'rpl_freopen': ../lib/freopen.c:82:19: internal compiler error: in valid_to_unchecked_stat= e, at analyzer/sm-fd.cc:751 82 | if (dup2 (nullfd, fd) < 0) | ^~~~~~~~~~~~~~~~~ 0x7bc106 valid_to_unchecked_state ../../gcc/analyzer/sm-fd.cc:751 0x7bc106 valid_to_unchecked_state ../../gcc/analyzer/sm-fd.cc:742 0x7bc106 check_for_dup ../../gcc/analyzer/sm-fd.cc:990 0x12a5e8c on_stmt ../../gcc/analyzer/sm-fd.cc:805 0x124f4e4 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, ana::path_context*) ../../gcc/analyzer/engine.cc:1449 0x1251f1b ana::exploded_graph::process_node(ana::exploded_node*) ../../gcc/analyzer/engine.cc:3868 0x1252dba ana::exploded_graph::process_worklist() ../../gcc/analyzer/engine.cc:3271 0x125514d ana::impl_run_checkers(ana::logger*) ../../gcc/analyzer/engine.cc:5912 0x125614e ana::run_checkers() ../../gcc/analyzer/engine.cc:5986 0x1245ee8 execute ../../gcc/analyzer/analyzer-pass.cc:87 [1] compiling coreutils commit: https://git.savannah.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D9f71f= 478ec6929d323c17f0482db8791de87b4fd [2] https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit;h=3Dfe4dc4f553d8639b0ce3465= e5e6dcf61c1ae9752=