From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11155 invoked by alias); 19 Nov 2014 11:44:12 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 11136 invoked by uid 89); 19 Nov 2014 11:44:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-oi0-f54.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/QmPg2ZJDjuuF9qF8K0XXzq9e+uzmS/tQudn6XdA+JA=; b=VmUjD4j9gMVl2Is4FX6uo8aGDYjoz1e+85J8ZuuJAtRrTtZjd14896GxErJBkXhXG9 IIKJYqWYMprFjP5ZtWKGfWRUEUVXZHyeZ6uSf63/EfAGzXPGSHxityluac+P/0zEokjc 1egVO7wLs5fbMuZVmJwwjjJ9BJ9efXZX0TOKfJqNWhuJDAGN1Fn9qaeqp6Mkcm19zzEo 2HVflkY7+tPJ9S0noLJm9zrAbfWE3JDUd6L/Hs1P1joMD3ca4TUd1bGX3SOTj1jdABSl YDPa96qGmQRImHHeeyC7pTLus9NlDdttexvnh1nmbdYixzCcPfLsNWbR4//k9jZt4d3e RTGQ== MIME-Version: 1.0 X-Received: by 10.60.69.131 with SMTP id e3mr35849000oeu.0.1416397449606; Wed, 19 Nov 2014 03:44:09 -0800 (PST) In-Reply-To: <1416393981-39626-8-git-send-email-dmalcolm@redhat.com> References: <1416393981-39626-1-git-send-email-dmalcolm@redhat.com> <1416393981-39626-8-git-send-email-dmalcolm@redhat.com> Date: Wed, 01 Jan 2014 00:00:00 -0000 Message-ID: Subject: Re: [PATCH 07/21] PR jit/63854: Fix leak of optimization_summary_obstack From: Richard Biener To: David Malcolm Cc: GCC Patches , jit@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-q4/txt/msg00172.txt.bz2 On Wed, Nov 19, 2014 at 11:46 AM, David Malcolm wrote: > This was leaking ~4KB per iteration: Ok. Thanks, Richard. > 16,256 bytes in 4 blocks are definitely lost in loss record 234 of 239 > at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) > by 0x5D75C17: xmalloc (xmalloc.c:147) > by 0x30958842DB: _obstack_begin (obstack.c:184) > by 0x4DFECDE: bitmap_obstack_initialize(bitmap_obstack*) (bitmap.c:338) > by 0x5CA3C1D: ipa_init() (ipa-reference.c:431) > by 0x5CA3FB1: generate_summary() (ipa-reference.c:551) > by 0x5CA4650: propagate() (ipa-reference.c:684) > by 0x5CA5BEE: (anonymous namespace)::pass_ipa_reference::execute(function*) (ipa-reference.c:1178) > by 0x522354D: execute_one_pass(opt_pass*) (passes.c:2306) > by 0x5224427: execute_ipa_pass_list(opt_pass*) (passes.c:2700) > by 0x4E495C1: ipa_passes() (cgraphunit.c:2088) > by 0x4E498E0: symbol_table::compile() (cgraphunit.c:2172) > > gcc/ChangeLog: > PR jit/63854 > * ipa-reference.c (ipa_reference_c_finalize): Release > optimization_summary_obstack. > --- > gcc/ipa-reference.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c > index b421f63..1ce06d1 100644 > --- a/gcc/ipa-reference.c > +++ b/gcc/ipa-reference.c > @@ -1193,5 +1193,9 @@ make_pass_ipa_reference (gcc::context *ctxt) > void > ipa_reference_c_finalize (void) > { > - ipa_init_p = false; > + if (ipa_init_p) > + { > + bitmap_obstack_release (&optimization_summary_obstack); > + ipa_init_p = false; > + } > } > -- > 1.8.5.3 >