public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.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:33:07 +0000	[thread overview]
Message-ID: <bug-99447-4-msEgYSZTZk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99447-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99447

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #6)
> More specifically, likely caused by
> g:ae99b315ba5b9e1ccc221b3c45de323cbc574400 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 = NULL;
>     vec_free (bb->preds);
>     bb->preds = 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
> contained 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?

Note we can't leave cgraph & edge reclaim to GC when we free a function
and at the same time forcefully ggc_free things pointed to (but ultimatively
dead).  That's in principle true for the gimple stmts themselves as well.

It looks like release_function_body simply leaves stmts dangling, it doesn't
remove them from blocks (clearing ->bb).  We've not seen ICEs from that
for unknown reasons.

I'm not sure it's worth all the trouble?

  parent reply	other threads:[~2021-03-17 12:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 10:35 [Bug lto/99447] New: " doko at debian dot org
2021-03-07 10:41 ` [Bug lto/99447] " doko at debian dot org
2021-03-07 11:17 ` pinskia at gcc dot gnu.org
2021-03-08  8:46 ` marxin at gcc dot gnu.org
2021-03-08  9:01 ` rguenth at gcc dot gnu.org
2021-03-08 10:57 ` doko at debian dot org
2021-03-17 12:18 ` rguenth at gcc dot gnu.org
2021-03-17 12:20 ` rguenth at gcc dot gnu.org
2021-03-17 12:33 ` rguenth at gcc dot gnu.org [this message]
2021-03-17 12:38 ` rguenth at gcc dot gnu.org
2021-03-17 12:39 ` rguenth at gcc dot gnu.org
2021-03-17 13:30 ` hubicka at ucw dot cz
2021-03-25 15:27 ` marxin at gcc dot gnu.org
2021-03-26 11:03 ` doko at gcc dot gnu.org
2021-03-26 11:18 ` [Bug ipa/99447] " rguenth at gcc dot gnu.org
2021-03-29 18:20 ` hubicka at gcc dot gnu.org
2021-03-29 21:45 ` hubicka at gcc dot gnu.org
2021-03-30  7:20 ` rguenth at gcc dot gnu.org
2021-03-30  8:49 ` hubicka at gcc dot gnu.org
2021-03-30  9:00 ` hubicka at gcc dot gnu.org
2021-03-30 12:16 ` hubicka at gcc dot gnu.org
2021-03-31  9:18 ` doko at debian dot org
2021-03-31  9:18 ` doko at gcc dot gnu.org
2021-03-31  9:19 ` doko at gcc dot gnu.org
2021-03-31  9:33 ` hubicka at ucw dot cz
2021-03-31  9:35 ` cvs-commit at gcc dot gnu.org
2021-03-31  9:39 ` hubicka at ucw dot cz
2021-03-31 18:10 ` cvs-commit at gcc dot gnu.org
2021-03-31 18:12 ` hubicka at gcc dot gnu.org
2021-04-01 12:50 ` doko at debian dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99447-4-msEgYSZTZk@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).