This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: binutils/2467: "ar q" / ranlib has large memory use (linear in archive size)


On Fri, Mar 24, 2006 at 11:41:39AM +1030, Alan Modra wrote:
> On Mon, Mar 20, 2006 at 06:23:03PM -0800, H. J. Lu wrote:
> > Will this patch break anything?
> 
> I don't know the answer to that, but really, it's something that you as
> patch submitter should answer.  You could gain a reasonable level of

I think it is safe. _bfd_generic_bfd_free_cached_info is called from
_bfd_compute_and_write_armap only. It has no problems with gcc build.

> confidence by allocating and scribbling on some memory after you've
> freed the objalloc.  Test it with a coff an aout target too.
> 

I added

  abfd->sections = NULL;
  abfd->section_last = NULL;
  abfd->outsymbols = NULL;
  abfd->tdata.any = NULL;
  abfd->usrdata = NULL;
  abfd->memory = NULL;

It doesn't cause any trouble. I checked i386-coff and i386-aout.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]