From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51142 invoked by alias); 5 Nov 2018 20:46:08 -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 46020 invoked by uid 89); 5 Nov 2018 20:45:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:skynet, H*F:D*skynet.be X-HELO: mailsec106.isp.belgacom.be Received: from mailsec106.isp.belgacom.be (HELO mailsec106.isp.belgacom.be) (195.238.20.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Nov 2018 20:45:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1541450752; x=1572986752; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=aYDW4qn9sUztzQmOapIZC/OqYpLCHYsGKgnq8+CbHMA=; b=sLrfTEy3VAV0g+UTH+JSDIvCd9xTpK1FHoqz9gS+p5niZekAloh7pyY3 s7enFEIDAMA4HwI70SdrR7zME0RBqQ==; Received: from 110.212-243-81.adsl-dyn.isp.belgacom.be (HELO md) ([81.243.212.110]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 05 Nov 2018 21:45:50 +0100 Message-ID: <1541450750.1485.4.camel@skynet.be> Subject: Re: [RFA] Fix 4K leak in open_source_file each time next/step changes of function. From: Philippe Waroquiers To: Tom Tromey Cc: gdb-patches@sourceware.org Date: Mon, 05 Nov 2018 20:46:00 -0000 In-Reply-To: <87tvkvmgwj.fsf@tromey.com> References: <20181104165507.24341-1-philippe.waroquiers@skynet.be> <87tvkvmgwj.fsf@tromey.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00047.txt.bz2 On Mon, 2018-11-05 at 13:02 -0700, Tom Tromey wrote: > > > > > > "Philippe" == Philippe Waroquiers writes: > > Philippe> Note that I do not understand why find_and_open_source always tries to > Philippe> re-execute the substitution rules on the provided fullname, as source.c > Philippe> symtab_to_fullname just blindly returns a non NULL s->fullname, counting on > Philippe> forget_cached_source_info to be called if search dir or substitution rules are > Philippe> changed. Similarly, psymtab_to_fullname also just returns a non NULL > Philippe> ps-> fullname. > > It would be good to investigate & maybe remove this. > > Philippe> 2018-11-04 Philippe Waroquiers > > Philippe> * source.c (open_source_file): Fix leak by transferring the > Philippe> current s->fullname to the unique_xmalloc_ptr fullname given > Philippe> to find_and_open_source. > > Thanks, this is ok. Thanks for the review, pushed. I have added on my list of things to do to clarify find_and_open_source substitution rules apply/re-apply logic. Philippe