From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A51DB3857C5E; Thu, 20 Aug 2020 21:02:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A51DB3857C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597957365; bh=aHdUYzEy3UPiye4DqpzG3EJhIAUhNZwZF7YPWlw6wvU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WbbhvKGH9BEk0wZngI13jO0SioNzwhyoOkr5BL6EKdVdVftl5J3dT2YKeyggmzKDJ IT4iTYGoquyso9cnvw5Eq3ysaMaYSNW5JgD5nScr3NaiZt94wE8LBeZ90vXwnmkB0Q BdGAdQdVYRRi3AeSqVVqagBLNXqSdxODeZntCeJ8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/96723] [11 Regression] ICE: SIGSEGV: infinite recursion in ana::region::get_subregions_for_binding with -Og -fanalyzer Date: Thu, 20 Aug 2020 21:02:45 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code 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: Thu, 20 Aug 2020 21:02:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96723 --- Comment #3 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:00cb0f5840795698557731c6e549a5ce99573223 commit r11-2789-g00cb0f5840795698557731c6e549a5ce99573223 Author: David Malcolm Date: Thu Aug 20 10:00:49 2020 -0400 analyzer: fix infinite recursion ICE on unions [PR96723] Attempts to store sm-state into a union in C++ triggered an infinite recursion when trying to generate a representative tree, due to erroneously trying to use the dtor of the union as a field. Fix it by filtering out non-FIELD_DECLs when walking TYPE_FIELDs in region::get_subregions_for_binding. gcc/analyzer/ChangeLog: PR analyzer/96723 * region-model-manager.cc (region_model_manager::get_field_region): Assert that field is a FIELD_DECL. * region.cc (region::get_subregions_for_binding): In union-handling, filter the TYPE_FIELDS traversal to just FIELD_DECLs. gcc/testsuite/ChangeLog: PR analyzer/96723 * g++.dg/analyzer/pr96723.C: New test.=