This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix Darwin bug, PR gdb/14290
- From: Tristan Gingold <gingold at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 28 Nov 2012 14:10:50 +0100
- Subject: Re: RFA: fix Darwin bug, PR gdb/14290
- References: <878v9mddpf.fsf@fleche.redhat.com>
On Nov 27, 2012, at 8:54 PM, Tom Tromey wrote:
> This fixes the bug reported in PR gdb/14290.
>
> The bug is a double free. The problem is that gdb doesn't wrap
> gdb_bfd_mach_o_fat_extract, which can return either a contained BFD or
> its argument.
>
> The fix is to write a wrapper for this functionality so that the BFD
> reference counting is handled properly. This required exposing a bit
> more API from gdb_bfd.c.
Looks good to me, but you're the bfd_ref expert!
Tristan.