From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91430 invoked by alias); 5 Nov 2018 20:02:58 -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 91416 invoked by uid 89); 5 Nov 2018 20:02:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=investigate X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.148.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Nov 2018 20:02:55 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway34.websitewelcome.com (Postfix) with ESMTP id BC1A0B2685 for ; Mon, 5 Nov 2018 14:02:53 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Jl5JgV3v5BcCXJl5JggL7u; Mon, 05 Nov 2018 14:02:53 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YmeARfhZI1QIXwfcVM7FjyUjdr+xa3ioO8js3nybj8c=; b=STIy7teT60BH/P/t29jNTNYUO7 iZEi9kSyS9BbNqoO3N1JOMIZh+HzDZWlGoZMTrbL/sDIQuP965SDDN0MmmM3g86xqyBWJpkrF+Asr FM20dj1KsyKF6DydWCiSG01VD; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:38700 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gJl5J-002uGi-Dc; Mon, 05 Nov 2018 14:02:53 -0600 From: Tom Tromey To: Philippe Waroquiers Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Fix 4K leak in open_source_file each time next/step changes of function. References: <20181104165507.24341-1-philippe.waroquiers@skynet.be> Date: Mon, 05 Nov 2018 20:02:00 -0000 In-Reply-To: <20181104165507.24341-1-philippe.waroquiers@skynet.be> (Philippe Waroquiers's message of "Sun, 4 Nov 2018 17:55:07 +0100") Message-ID: <87tvkvmgwj.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-11/txt/msg00046.txt.bz2 >>>>> "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. Tom