[RFC/RFA] dangling bfd pointer in archive cache...

Joel Brobecker brobecker@adacore.com
Mon Oct 15 18:01:00 GMT 2012


> No, we should already be calling _bfd_archive_close_and_cleanup via 
> 
> > --- a/bfd/opncls.c
> > +++ b/bfd/opncls.c
> > @@ -719,6 +719,17 @@ bfd_close (bfd *abfd)
> >    if (! BFD_SEND (abfd, _close_and_cleanup, (abfd)))
> 
> this call.  The problem is in coff-rs6000.c (and coff64-rs6000.c)
> where the bfd_target vector just uses bfd_true for close_and_cleanup.

Attached is a patch that implements your suggestion. Tested on ppc-aix
using AdaCore's GDB testsuite.

While at it, the powermac XCOFF backend also seemed to be using
the same code that eventually leads to the dangling pointer, and so
I fixed it as well. It's untested, but seems straightforward enough.

OK to commit?

Thanks,
-- 
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Dangling-bfd-pointer-in-archive-cache.patch
Type: text/x-diff
Size: 1158 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20121015/1e62d7aa/attachment.bin>


More information about the Gdb-patches mailing list