From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A9B638582B3; Mon, 8 Aug 2022 06:39:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A9B638582B3 From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/106551] New: [13 Regression] dup2 causes -fanalyser ICE in valid_to_unchecked_state, at analyzer/sm-fd.cc:751 Date: Mon, 08 Aug 2022 06:39:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: slyfox at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Mon, 08 Aug 2022 06:39:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106551 Bug ID: 106551 Summary: [13 Regression] dup2 causes -fanalyser ICE in valid_to_unchecked_state, at analyzer/sm-fd.cc:751 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- This week's gcc started ICEing on libpipeline-1.5.4 upstream package. Minimal reproducer turned up by cvise: $ cat a.c.c extern int m; int dup2(int, int); void error(void); void max_active_pipelines_pdes(void) { if (dup2(m, 1)) error(); } $ gcc -g -O2 -Wall -c a.c.c -fanalyzer during IPA pass: analyzer a.c.c: In function 'max_active_pipelines_pdes': a.c.c:5:7: internal compiler error: in valid_to_unchecked_state, at analyzer/sm-fd.cc:751 5 | if (dup2(m, 1)) | ^~~~~~~~~~ 0x1ef7d74 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, = char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x1ef89c6 internal_error(char const*, ...) ???:0 0x9023d4 fancy_abort(char const*, int, char const*) ???:0 0x85baa7 ana::(anonymous namespace)::fd_state_machine::check_for_dup(ana::sm_context*, ana::supernode const*, gimple const*, gcall const*, tree_node*, ana::(anonymous namespace)::dup) const [clone .cold] ???:0 0x135181c ana::(anonymous namespace)::fd_state_machine::on_stmt(ana::sm_context*, ana::supernode cons= t*, gimple const*) const ???:0 0x12fcd74 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, ana::path_context*) ???:0 0x12ff7ab ana::exploded_graph::process_node(ana::exploded_node*) ???:0 0x130064a ana::exploded_graph::process_worklist() ???:0 0x1302999 ana::impl_run_checkers(ana::logger*) ???:0 0x130394e ana::run_checkers() ???:0 0x12f37e8 (anonymous namespace)::pass_analyzer::execute(function*) ???:0 $ gcc -v |& unnix Using built-in specs. COLLECT_GCC=3D/<>/gcc-13.0.0/bin/gcc COLLECT_LTO_WRAPPER=3D/<>/gcc-13.0.0/libexec/gcc/x86_64-unknown-linux-= gnu/13.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220807 (experimental) (GCC)=