From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4794 invoked by alias); 19 May 2015 10:04:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 4785 invoked by uid 89); 19 May 2015 10:04:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 19 May 2015 10:04:54 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4F424A0E7C; Tue, 19 May 2015 10:04:53 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4JA4omf006067; Tue, 19 May 2015 06:04:51 -0400 Message-ID: <555B0AC2.7080506@redhat.com> Date: Tue, 19 May 2015 10:04:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org, Jerome Guitton Subject: Re: [RFA/commit] Memory leak in on reading frame register References: <1431100524-7793-1-git-send-email-brobecker@adacore.com> <55508A83.3060605@redhat.com> <20150511205312.GE4767@adacore.com> <5551CB20.4090104@redhat.com> <20150515155823.GL4767@adacore.com> In-Reply-To: <20150515155823.GL4767@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00467.txt.bz2 On 05/15/2015 04:58 PM, Joel Brobecker wrote: >> > Thanks. I wonder whether the leaks come from constructing the >> > current frame at each stop, instead of from evaluating >> > breakpoint conditions. E.g.., if we do a "step" over: >> > >> > while (1); >> > >> > ... are we constantly leaking values until the user does >> > ctrl-c? >> > >> > That would suggest to me to that we should be doing >> > value_mark/value_free_to_mark around each >> > handle_inferior_event. > A very accurate guess, as it turns out. Condition evaluation > is not the problem, here, but indeed, we a couple of calls to > handle_inferior in addition to each call to > bpstat_check_breakpoint_conditions. The former are responsible > for the leak. > > How about the attached patch? Looks good to me. Thanks, Pedro Alves