From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23382 invoked by alias); 30 Jul 2019 08:49:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 9395 invoked by uid 89); 30 Jul 2019 08:48:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,SPF_PASS autolearn=ham version=3.3.1 spammy=touching, HContent-Transfer-Encoding:8bit X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Jul 2019 08:48:51 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C83EAAED5; Tue, 30 Jul 2019 08:48:49 +0000 (UTC) Subject: Re: [PATCH] Clean up dangling pointers in cgraph_edge (PR ipa/89330). To: Richard Biener Cc: GCC Patches , Andreas Schwab References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <972e1d34-729d-23d2-09a1-cdaf758cda5c@suse.cz> Date: Tue, 30 Jul 2019 08:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg01773.txt.bz2 On 7/30/19 10:36 AM, Richard Biener wrote: > On Tue, Jul 30, 2019 at 9:27 AM Martin Liška wrote: >> >> Hi. >> >> We have to clean up dangling pointers before we call ggc_free for a cgraph_edge. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> And it survives --enable-checking=release bootstrap on x86_64-linux-gnu. >> >> Ready to be installed? > > Eh? The only "real" effect I see is that e->indirect_info test is now > never true. Yep, you are right. > > I think it rather means the edge we ggc_free is still referenced to > from somewhere > and _that_ needs to be fixed or we ggc_free the edge wrongly. Yes, that's one another situation IPA CP is touching a dead cgraph_edge. Martin will help me latter. I'm reducing a test-case now.. Martin > > Richard. > >> Thanks, >> Martin >> >> gcc/ChangeLog: >> >> 2019-07-30 Martin Liska >> >> PR ipa/89330 >> * cgraph.c (symbol_table::free_edge): Memset 0 to cgraph_edge >> before we call ggc_free. >> --- >> gcc/cgraph.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >>