This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]