From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92189 invoked by alias); 30 Nov 2018 16:39:28 -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 92174 invoked by uid 89); 30 Nov 2018 16:39:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=ages, brain, nicer, source.c X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Nov 2018 16:39:25 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway32.websitewelcome.com (Postfix) with ESMTP id DD4D9110572 for ; Fri, 30 Nov 2018 10:39:23 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Slp5gTDHdBcCXSlp5gXmov; Fri, 30 Nov 2018 10:39:23 -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=FlGxWOizHYqIPDc1cJOIDXPNEIYv2qfNg86JXq9tr1s=; b=FH0qgkvn+B7T6eP7MM9dr5PaR4 lRGJzilJ8G19ryQbQfQUkDPhTiXo52tUyzOvoX9tPi4ScGbLZAMQSTgb94CcPYfjZv1GjAFV+1hX2 bqhIf16LhckiyoaRCaj9n7zO2; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:60030 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gSlp5-001P5X-KM; Fri, 30 Nov 2018 10:39:23 -0600 From: Tom Tromey To: Philippe Waroquiers Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PUSHED/OBVIOUS] Re-fix leak in source.c (open_source_file). References: <20181124115237.8943-1-philippe.waroquiers@skynet.be> <87ftvjbvmc.fsf@tromey.com> <1543533240.4149.9.camel@skynet.be> <87y39b79a8.fsf@tromey.com> <1543535115.4149.11.camel@skynet.be> Date: Fri, 30 Nov 2018 16:39:00 -0000 In-Reply-To: <1543535115.4149.11.camel@skynet.be> (Philippe Waroquiers's message of "Fri, 30 Nov 2018 00:45:15 +0100") Message-ID: <87k1ku1pvp.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/msg00572.txt.bz2 >>>>> "Philippe" == Philippe Waroquiers writes: >> What are the leaks? I wonder if the "fullname"s in the psymtabs aren't >> being freed. Philippe> Yes, the 4K leak is the fullname (but fullname is freed now in all tests Philippe> except in the 4 below tests, which all have something to do with reloading Philippe> an executable/reload symbols ... I thought I sent a reply to this yesterday but I don't see it now. My first guess is that reread_symbols isn't calling forget_cached_source_info_for_objfile. Ages ago Jan had a patch to make reread_symbols just do a delete+new for the objfile, rather than trying to do a brain transplant on the object. That still seems like a good idea, for this sort of reason. However, once my psymtab series lands, it seems nicer to just move this logic into the psymtab holder object. This should fix the bug as well. Tom