Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [PUSHED/OBVIOUS] Re-fix leak in source.c (open_source_file).
Date: Fri, 30 Nov 2018 16:39:00 -0000	[thread overview]
Message-ID: <87k1ku1pvp.fsf@tromey.com> (raw)
In-Reply-To: <1543535115.4149.11.camel@skynet.be> (Philippe Waroquiers's	message of "Fri, 30 Nov 2018 00:45:15 +0100")

>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> 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


      reply	other threads:[~2018-11-30 16:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181124115237.8943-1-philippe.waroquiers@skynet.be>
2018-11-29 18:13 ` Tom Tromey
2018-11-29 23:14   ` Philippe Waroquiers
2018-11-29 23:29     ` Tom Tromey
2018-11-29 23:45       ` Philippe Waroquiers
2018-11-30 16:39         ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1ku1pvp.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=philippe.waroquiers@skynet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox