From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 644793858C32; Fri, 22 Mar 2024 15:09:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 644793858C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711120190; bh=HwTOZ692HaJqE+biptBRqoM9y1yovwR3EbYMCEPNl2M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nFvNiQMjvMdEjd9NG9/UCM8hcSpb25DZui5GtnTWfsYHdei2NT5lfYkdd5Pp/1z9x gmL5Lsjf0xgXImUEK66fJW1lS4GSBg9ncFI2hYudpTsB4BjtPF07DFusHUbROjvQHY zLHz2epkYNAfzqjm0kQq4zi7PGLm7x3TQ8G3YGAQ= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/114408] [13/14 Regression] ICE when invoking strcmp multiple times with -fsanitize=undefined -O1 -fanalyzer -flto Date: Fri, 22 Mar 2024 15:09:49 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, link-failure, lto, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D114408 --- Comment #2 from David Malcolm --- Created attachment 57781 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57781&action=3Dedit WIP patch for the the ICE The attached patch seems to fix the ICE. AIUI I'm lazily creating dominance info as it's needed; calculate_dominance_info has this early exit: if (dom_computed[dir_index] =3D=3D DOM_OK) { checking_verify_dominators (dir); return; } and free_dominance_info has this early exit: if (!dom_info_available_p (fn, dir)) return; So iterating through all funs with gimple bodies at the end of analyzer cal= ling free_dominance_info on them ought to clean things up - and seems to fix the ICE. However I'm having trouble writing a regression test for this, with the combination of ubsan and lto: I get: output is /usr/bin/ld: cannot find -lubsan collect2: error: ld returned 1 exit status Ideas on fixing welcome.=