public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: New modref/ipa_modref optimization passes
Date: Tue, 22 Sep 2020 07:21:21 -0400	[thread overview]
Message-ID: <6a8bf0b30fff9059afc2c5f7af13b863e3c93dad.camel@redhat.com> (raw)
In-Reply-To: <20200922070731.GA15864@kam.mff.cuni.cz>

On Tue, 2020-09-22 at 09:07 +0200, Jan Hubicka wrote:
> > > (gdb) p summaries
> > > $3 = (fast_function_summary<modref_summary*, va_gc> *) 0x0
> > > 
> > > I'm still investigating (but may have to call halt for the
> > > night), but
> > > this could be an underlying issue with the new passes; the jit
> > > testsuite runs with the equivalent of:
> > > 
> > > --param=ggc-min-expand=0 --param=ggc-min-heapsize=0
> > > 
> > > throughout to shake out GC issues (to do a full collection at
> > > each GC
> > > opportunity).
> > > 
> > > Was this code tested with the jit?  Do you see issues in cc1 if
> > > you set
> > > those params?  Anyone else seeing "random" crashes?
> > 
> > I suppose this happes when pass gets constructed but no summary is
> > computed.  Dos the NULL pointer guard here help?
> 
> Hi,
> I am currently in train and can not test the patch easilly, but this
> should help.  If you run the pass on empty input then the destruction
> happens with NULL summaries pointer.
> 
> My apologizes for that.
> Honza
> 
> diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
> index af0b710333e..cd92b5a81d3 100644
> --- a/gcc/ipa-modref.c
> +++ b/gcc/ipa-modref.c
> @@ -769,7 +885,8 @@ class pass_modref : public gimple_opt_pass
>  
>      ~pass_modref ()
>        {
> -	ggc_delete (summaries);
> +	if (summaries)
> +	  ggc_delete (summaries);
>  	summaries = NULL;
>        }

Thanks; with that it survives the first in-process iteration, but then
dies inside the 3rd in-process iteration, on a different finalizer. 
I'm beginning to suspect a pre-existing bad interaction between
finalizers and jit which perhaps this patch has exposed.

I'll continue to investigate it.

Dave


  reply	other threads:[~2020-09-22 11:21 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16 22:23 David Čepelík
2020-09-19 22:32 ` Jan Hubicka
2020-09-20  6:15   ` Jan Hubicka
2020-09-21  7:13     ` Richard Biener
2020-09-21  7:47       ` Jan Hubicka
2020-09-21  7:55         ` Richard Biener
2020-09-21  8:04           ` Jan Hubicka
2020-09-21  8:10             ` Richard Biener
2020-09-22 10:15               ` Tobias Burnus
2020-09-27 21:37                 ` Jan Hubicka
2020-10-16  7:56                   ` Jan Hubicka
2020-10-16  8:05                     ` Richard Biener
2020-10-16  9:20                       ` Richard Biener
2020-10-16 10:42                         ` Richard Biener
2020-10-23  9:54                         ` Bernhard Reutner-Fischer
2020-10-23 10:05                           ` Andre Vehreschild
2020-10-29 15:14     ` Jan Hubicka
2020-10-30  8:16       ` Richard Biener
2020-09-20 14:33   ` David Malcolm
2020-09-20 17:30     ` Jan Hubicka
2020-09-20 23:27       ` David Malcolm
2020-09-22 18:47         ` Jan Hubicka
2020-09-22 20:19           ` Jan Hubicka
2020-09-21 23:14       ` David Malcolm
2020-09-22  6:45         ` Jan Hubicka
2020-09-22  7:07           ` Jan Hubicka
2020-09-22 11:21             ` David Malcolm [this message]
2020-09-22 12:29               ` Jan Hubicka
2020-09-22 18:39               ` Jan Hubicka
2020-09-22 20:13                 ` David Malcolm
2020-09-22 20:21                   ` David Malcolm
2020-09-22 20:24                     ` Jan Hubicka
2020-09-22 20:47                       ` Issue with ggc_delete and finalizers (was Re: New modref/ipa_modref optimization passes) David Malcolm
2020-09-23  8:31                         ` Jan Hubicka
2020-09-24  6:30                         ` Jan Hubicka
2020-09-25 14:42                           ` David Malcolm
2020-09-22 20:23                   ` New modref/ipa_modref optimization passes Jan Hubicka
2020-09-22 21:17                     ` David Malcolm
2020-09-22  8:13   ` [committed] ipa: Fix up ipa modref option help texts Jakub Jelinek
2020-09-22  8:47     ` Jakub Jelinek
2020-09-22  9:12       ` Jan Hubicka

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=6a8bf0b30fff9059afc2c5f7af13b863e3c93dad.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /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).