Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [RFC/RFA] dangling bfd pointer in archive cache...
Date: Wed, 03 Oct 2012 13:30:00 -0000	[thread overview]
Message-ID: <20121003133019.GE3028@adacore.com> (raw)
In-Reply-To: <20121003052937.GB25219@bubble.grove.modra.org>

Hello Alan,

Thanks for the review!

> On Tue, Oct 02, 2012 at 07:14:06AM -0700, Joel Brobecker wrote:
> >         * opncls.c (bfd_close); Add call to _bfd_archive_close_and_cleanup.
> 
> No, we should already be calling _bfd_archive_close_and_cleanup via 

OK, but before I go ahead with your implementation, I wanted to
make sure about something...

> > --- 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.

... My reasoning is that this part of the job isn't target-specific.
It's entirely related to how the generic side of archives is handled,
not to the target itself. To me, it needs to be called regardless
of the actual target, and requiring that the target code set it up
is a recipe for having some of them forgetting to do it (which is
what actually happened here).

WDYT? Am I wrong?

-- 
Joel


  reply	other threads:[~2012-10-03 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 14:14 Joel Brobecker
2012-10-03  5:29 ` Alan Modra
2012-10-03 13:30   ` Joel Brobecker [this message]
2012-10-04  8:01     ` Alan Modra
2012-10-15 18:01   ` Joel Brobecker
2012-10-16  1:48     ` Alan Modra
2012-10-16 22:58       ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121003133019.GE3028@adacore.com \
    --to=brobecker@adacore.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox