From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 8650B385782F for ; Tue, 22 Sep 2020 07:07:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8650B385782F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=hubicka@kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 320192809CE; Tue, 22 Sep 2020 09:07:31 +0200 (CEST) Date: Tue, 22 Sep 2020 09:07:31 +0200 From: Jan Hubicka To: David Malcolm Cc: gcc-patches@gcc.gnu.org Subject: Re: New modref/ipa_modref optimization passes Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922064545.GF91738@kam.mff.cuni.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-16.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 07:07:34 -0000 > > (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; } > > Honza > > > > Thanks > > Dave > > > >