[PATCH v3 10/18] BFD: Unset the format on releasing a BFD's objalloc memory

Maciej W. Rozycki macro@redhat.com
Tue Jan 13 01:42:13 GMT 2026


On Tue, 9 Dec 2025, Jan Beulich wrote:

> > --- binutils-gdb.orig/bfd/opncls.c
> > +++ binutils-gdb/bfd/opncls.c
> > @@ -195,6 +195,7 @@ _bfd_free_cached_info (bfd *abfd)
> >    abfd->outsymbols = NULL;
> >    abfd->tdata.any = NULL;
> >    abfd->usrdata = NULL;
> > +  abfd->format = bfd_unknown;
> >  
> >    return true;
> >  }
> 
> In exchange, shouldn't the identical assignment in bfd_make_readable() be dropped
> then?

 Fine with me, also for ->outsymbols, ->usrdata and ->tdata.any, following 
commit 3097045a18a8 ("ld plugin bfd_make_readable leak").  Included in v4.

  Maciej



More information about the Binutils mailing list