This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] PR 12028 "GDB crashes on a double free during overload resolution"
- From: Doug Evans <dje at google dot com>
- To: sami wagiaalla <swagiaal at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 18 Sep 2010 09:03:07 -0700
- Subject: Re: [patch] PR 12028 "GDB crashes on a double free during overload resolution"
- References: <4C937E2D.80500@redhat.com>
On Fri, Sep 17, 2010 at 7:41 AM, sami wagiaalla <swagiaal@redhat.com> wrote:
> old_cleanups was being set twice making the later call to discard_cleanups
> ignore the first 'make_cleanup' request.
>
> The patch is proposed for both head and the 7.2 branch.
>
> This has been regression tested on x8664 with gcc-4.4.4-10.fc13
>
> Sami
>
Hi. This patch is ok.
Looking at the function though, is this a memory leak?
i.e. you want to do_cleanups here, not discard them (right?).
else
{
*oload_syms = new_oload_syms;
*oload_champ = new_oload_champ;
*oload_champ_bv = new_oload_champ_bv;
discard_cleanups (old_cleanups);
return 0;
}