From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15598 invoked by alias); 24 Mar 2006 05:17:40 -0000 Received: (qmail 15587 invoked by uid 22791); 24 Mar 2006 05:17:40 -0000 X-Spam-Check-By: sourceware.org Received: from smtp114.sbc.mail.mud.yahoo.com (HELO smtp114.sbc.mail.mud.yahoo.com) (68.142.198.213) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 24 Mar 2006 05:17:38 +0000 Received: (qmail 56459 invoked from network); 24 Mar 2006 05:17:37 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.119.176 with login) by smtp114.sbc.mail.mud.yahoo.com with SMTP; 24 Mar 2006 05:17:36 -0000 Received: by lucon.org (Postfix, from userid 1000) id 9F839641B4; Thu, 23 Mar 2006 21:17:35 -0800 (PST) Date: Fri, 24 Mar 2006 07:27:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com, dcoutts@gentoo.org Subject: Re: PATCH: binutils/2467: "ar q" / ranlib has large memory use (linear in archive size) Message-ID: <20060324051735.GA2390@lucon.org> References: <20060321022303.GA3657@lucon.org> <20060324011139.GB16236@bubble.grove.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060324011139.GB16236@bubble.grove.modra.org> User-Agent: Mutt/1.4.2.1i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00314.txt.bz2 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.