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 ipa/99447] [11 Regression] ICE (segfault) in lookup_page_table_entry
Date: Tue, 30 Mar 2021 07:20:28 +0000	[thread overview]
Message-ID: <bug-99447-4-0nXGUmhUxE@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 #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #15)
> I also tried to reproduce this locally w/o luck.
> 
> Looking at the backtrace in detail, there is no DEF_STMT involved.  It walks
> from dwarf dies, to RTL constant pool address that points to tree which has
> abstract origin that points to symtab node which points to callgraph edge
> which points to dead basic block.
> 
> The pointer from cgraph node to edge that should be removed.
> I can add code to clear pointers SSA_NAME->def_stmt bit there is no def stmt
> in the backtrace, so it would not help here.

We're already doing this it seems:

void
fini_ssanames (struct function *fn)
{
  unsigned i;
  tree name;
  /* Some SSA names leak into global tree data structures so we can't simply
     ggc_free them.  But make sure to clear references to stmts since we now
     ggc_free the CFG itself.  */
  FOR_EACH_VEC_SAFE_ELT (SSANAMES (fn), i, name)
    if (name)
      SSA_NAME_DEF_STMT (name) = NULL;

> W/o reproducer it seem hard to tell what is/was real cause of this issue...

So the backtrace points at

              gt_ggc_m_11symtab_node
((*x).generic.function_decl.common.common.symtab_node);

from LTO 'tree' walk.  To me it's still obvious - we walk a cgraph edge
call_stmt and from there to gimple_bb which was freed.

Looking around the only place (we don't know whether this was WPA or LTRANS)
we'd have a cgraph with edges is during clone materialization which pointed
me at cgraph_node::release_body which frees the body but fails to eventually
zap ->call_stmt references.

Matthias reported this for "trunk 20210306" which I assume is a snapshot
tarball configured the Debian way.

> Honza

  parent reply	other threads:[~2021-03-30  7:20 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
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 [this message]
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-0nXGUmhUxE@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).