This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp
- From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 03 Feb 2019 18:58:49 +0100
- Subject: Re: [RFA] Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp
- References: <20190126223435.9411-1-philippe.waroquiers@skynet.be> <20190203104539.6272f9d8@f29-4.lan>
Thanks for looking at this.
The below change was discussed with Tom on irc.
Tom pushed a first fix in the splay tree, so it would be easier
for me if he (or someone else) could also push this one.
Thanks
Philippe
On Sun, 2019-02-03 at 10:45 -0700, Kevin Buettner wrote:
> On Sat, 26 Jan 2019 23:34:35 +0100
> Philippe Waroquiers <philippe.waroquiers@skynet.be> wrote:
>
> > include/ChangeLog
> > 2019-01-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
> >
> > * splay-tree.h (splay_tree_delete_key_fn): Update comment.
> > (splay_tree_delete_value_fn): Likewise.
> >
> > libiberty/ChangeLog
> > 2019-01-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
> >
> > * splay-tree.c (splay_tree_insert): Also release old KEY in case
> > of insertion of a key equal to an already present key.
> > (splay_tree_new_typed_alloc): Update comment.
>
> These changes look reasonable to me, BUT...
>
> I think you'll need to get approval for this patch from the gcc
> maintainers. The libiberty README file indicates that fixes should be
> sent to gcc-patches@gcc.gnu.org.
>
> Kevin