From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFC323861028; Tue, 30 Mar 2021 08:49:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFC323861028 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/99447] [11 Regression] ICE (segfault) in lookup_page_table_entry Date: Tue, 30 Mar 2021 08:49:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: GC, ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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: Tue, 30 Mar 2021 08:49:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99447 --- Comment #18 from Jan Hubicka --- > Looking around the only place (we don't know whether this was WPA or LTRA= NS) > we'd have a cgraph with edges is during clone materialization which point= ed > me at cgraph_node::release_body which frees the body but fails to eventua= lly > zap ->call_stmt references This I agree with, but during our last discussion I went through all release_body calls and found none which would match this scenario - they are all on paths where we zap cgraph edges to (it is only makes sense to exist = in this case, since we are supposed to keep cgrpah edges in sync with actual b= ody and after feeing the body this would leave cgaph in inconsistent stage). I will try to move tree to 20210306 and see if that helps. I can simply add cgraph edge removal to release_body to make code bit more robust - while most uses erases edges earlier, it is almost free to check t= he pointer for being NULL twice. Still it is weird that the bug does not reproduce with allways collect.=