From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id A021838708F1 for ; Tue, 22 Sep 2020 11:21:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A021838708F1 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-473-3S4G1KBKNIKZzN0sY-_7tA-1; Tue, 22 Sep 2020 07:21:23 -0400 X-MC-Unique: 3S4G1KBKNIKZzN0sY-_7tA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 878DF420F0; Tue, 22 Sep 2020 11:21:22 +0000 (UTC) Received: from ovpn-112-230.phx2.redhat.com (ovpn-112-230.phx2.redhat.com [10.3.112.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21DE578810; Tue, 22 Sep 2020 11:21:22 +0000 (UTC) Message-ID: <6a8bf0b30fff9059afc2c5f7af13b863e3c93dad.camel@redhat.com> Subject: Re: New modref/ipa_modref optimization passes From: David Malcolm To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org Date: Tue, 22 Sep 2020 07:21:21 -0400 In-Reply-To: <20200922070731.GA15864@kam.mff.cuni.cz> References: <157394261677.27454.2367573047582814412@a285.localdomain> <20200919223255.GA69342@kam.mff.cuni.cz> <20200920173043.GD6758@kam.mff.cuni.cz> <9597b8e20d5b50ad4e501d4506e578107474d55f.camel@redhat.com> <20200922064545.GF91738@kam.mff.cuni.cz> <20200922070731.GA15864@kam.mff.cuni.cz> User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 11:21:26 -0000 On Tue, 2020-09-22 at 09:07 +0200, Jan Hubicka wrote: > > > (gdb) p summaries > > > $3 = (fast_function_summary *) 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