From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A322385BF9E; Wed, 17 Mar 2021 12:18:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A322385BF9E From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/99447] [11 Regression] ICE (segfault) in lookup_page_table_entry Date: Wed, 17 Mar 2021 12:18:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: GC, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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: Wed, 17 Mar 2021 12:18:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99447 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #6 from Richard Biener --- More specifically, likely caused by g:ae99b315ba5b9e1ccc221b3c45de323cbc574= 400 which did diff --git a/gcc/cfg.c b/gcc/cfg.c index 529b6ed2105..e8bd1456c9f 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -102,8 +102,7 @@ free_block (basic_block bb) bb->succs =3D NULL; vec_free (bb->preds); bb->preds =3D NULL; - /* Do not free BB itself yet since we leak pointers to dead statements - that points to dead basic blocks. */ + ggc_free (bb); } /* Free the memory associated with the CFG in FN. */ and the backtrace of the crash points at some RTX tree (if gtype-desc from trunk still matches, it's likely SYMBOL_REF_DECL) refers to a GIMPLE stmt via the callgraph edge ->call_stmt which refers to the CFG BB it is contain= ed in. unfortunately it's not visible what pass/phase this segfault occurs in (might be WPA function materialization or ltrans compilation). That said, the ggc_free above looks like a bad idea until we can sort out these issue. So - should we simply revert the change again?=