From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17558 invoked by alias); 11 Oct 2019 11:09:38 -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 17550 invoked by uid 89); 11 Oct 2019 11:09:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:992 X-HELO: mail-lf1-f47.google.com Received: from mail-lf1-f47.google.com (HELO mail-lf1-f47.google.com) (209.85.167.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Oct 2019 11:09:37 +0000 Received: by mail-lf1-f47.google.com with SMTP id u28so6740898lfc.5 for ; Fri, 11 Oct 2019 04:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+2OAS4z/d9zk7UwJCMYhDG0WwpTeww7Qu7UUNIIjOU8=; b=liUkSpI4+ckTduhV4eKmC1aAOl5D6ZAU1UZevTgedjlOf0cwFewjbNmNRhU6v4jmAz rdsbJ6ewIg1rtaueCYhbRgz79TUAjp8uOjV5aF8+1ttMg8owqDLntNvjKBwVzMO4IHLo PT9j9u9kv1NKTEBX3BcsztDtiSqY6CUbH5Ab6XWo14yfHa/1iDAafcdDZOhxvty9WKgL x4LnDHgfaPnDzY/hvLpLBurvbmQxlpwNhMdFBd5WttGwcaVL/mTae1EBa3Zno9LW4pI0 2JuxWT+6TIigFmKYXJ4IGg8KwNn+fmZnsmqAZSZnJWMOx8qbOFpohrhFpRZezVV1FP1i zW2g== MIME-Version: 1.0 References: <20191010192115.clao7fvj6mqohxfs@kam.mff.cuni.cz> In-Reply-To: <20191010192115.clao7fvj6mqohxfs@kam.mff.cuni.cz> From: Richard Biener Date: Fri, 11 Oct 2019 11:14:00 -0000 Message-ID: Subject: Re: Correctly release ipa-reference summarries To: Jan Hubicka Cc: GCC Patches , =?UTF-8?Q?Martin_Li=C5=A1ka?= Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00808.txt.bz2 On Thu, Oct 10, 2019 at 9:21 PM Jan Hubicka wrote: > > Hi, > this patch fixes code removing summaries in ipa-reference. As a memory > leak it may make sense to backport this to release branches. Please do so. Richard. > Honza > > * ipa-reference.c (propagate): Fix releasing of IPA summaries. > Index: ipa-reference.c > =================================================================== > --- ipa-reference.c (revision 276707) > +++ ipa-reference.c (working copy) > @@ -891,15 +889,14 @@ propagate (void) > > bitmap_obstack_release (&local_info_obstack); > > - if (ipa_ref_var_info_summaries == NULL) > + if (ipa_ref_var_info_summaries != NULL) > { > delete ipa_ref_var_info_summaries; > ipa_ref_var_info_summaries = NULL; > } > > - ipa_ref_var_info_summaries = NULL; > if (dump_file) > splay_tree_delete (reference_vars_to_consider); > reference_vars_to_consider = NULL; > return remove_p ? TODO_remove_functions : 0; > }