[patch] PR 12028 "GDB crashes on a double free during overload resolution"

Doug Evans dje@google.com
Sun Sep 19 17:39:00 GMT 2010


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;
    }



More information about the Gdb-patches mailing list