This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: bug in bfd in open file cache
- From: Mikulas Patocka <mikulas at artax dot karlin dot mff dot cuni dot cz>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at sources dot redhat dot com, <bug-binutils at gnu dot org>
- Date: Fri, 15 Aug 2003 13:47:39 +0200 (CEST)
- Subject: Re: bug in bfd in open file cache
> On Fri, Aug 15, 2003 at 02:59:13AM +0200, Mikulas Patocka wrote:
> > bfd_cached_lookup few lines above returned NULL because it coudn't open
> > file because the file was inside an archive.
>
> Please further investigate bfd_cache_lookup. Your bfd opened against
> an archive element should never match bfd_last_cache, thus
> bfd_cache_lookup_worker should be called. This function should open
> the archive file if it has been closed.
Oops, I found it. It was because I deallocated pointer that I passed as
filename to bfd_openr. Maybe it should be documented that the pointer must
be active as long as bfd is open.
Mikulas