From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [RFA] Fix leak in the dwarf reader
Date: Sun, 27 Nov 2022 21:19:48 +0100 [thread overview]
Message-ID: <3f4173f8bcf5256f8a549d99858e5f1f916693f1.camel@skynet.be> (raw)
In-Reply-To: <11aac52f-27ef-c1d8-1d22-e538bdb8e687@simark.ca>
On Sun, 2022-11-27 at 13:48 -0500, Simon Marchi wrote:
>
> On 11/27/22 07:54, Philippe Waroquiers via Gdb-patches wrote:
> > Valgrind reports a leak in the dwarf reader (see details below).
> > The function dw2_get_file_names_reader is interning in the per_objfile
> > all the file names it finds, except the name of 'fnd file name and directory'.
> > Instead, it was xstrdup-ing the name.
> > Fix the leaks by also interning the name.
> >
> > This was validated running the tests natively, and under valgrind.
> > Leaks have decreased as mentionned below.
> > Valgrind detected no error such as double free or use after free.
>
> I manually checked the uses of this field, it indeed doesn't appear to
> be freed, so:`
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
Thanks for the review, pushed with the approved tag.
prev parent reply other threads:[~2022-11-27 20:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-27 12:54 Philippe Waroquiers
2022-11-27 18:48 ` Simon Marchi
2022-11-27 20:19 ` Philippe Waroquiers [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=3f4173f8bcf5256f8a549d99858e5f1f916693f1.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).