From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18702 invoked by alias); 17 Aug 2012 15:36:49 -0000 Received: (qmail 18621 invoked by uid 22791); 17 Aug 2012 15:36:48 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-yx0-f169.google.com (HELO mail-yx0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Aug 2012 15:36:29 +0000 Received: by yenl1 with SMTP id l1so4578207yen.0 for ; Fri, 17 Aug 2012 08:36:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.8.8 with SMTP id n8mr4333381oea.38.1345217788734; Fri, 17 Aug 2012 08:36:28 -0700 (PDT) Received: by 10.76.10.6 with HTTP; Fri, 17 Aug 2012 08:36:28 -0700 (PDT) In-Reply-To: <871uj5muu7.fsf@fleche.redhat.com> References: <87txwknhzj.fsf@fleche.redhat.com> <20120803160934.GE4430@bubble.grove.modra.org> <87hasdgv0h.fsf@fleche.redhat.com> <20120809101540.GA30412@bubble.grove.modra.org> <87wr0zsw9h.fsf@fleche.redhat.com> <20120816135258.GN3947@bubble.grove.modra.org> <87393mpy79.fsf@fleche.redhat.com> <20120817004825.GP3947@bubble.grove.modra.org> <871uj5muu7.fsf@fleche.redhat.com> Date: Fri, 17 Aug 2012 15:38:00 -0000 Message-ID: Subject: Re: [PATCH 3/5] remove deleted BFDs from the archive cache From: "H.J. Lu" To: Tom Tromey Cc: Binutils Development Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00336.txt.bz2 On Fri, Aug 17, 2012 at 7:55 AM, Tom Tromey wrote: >>>>>> "Alan" == Alan Modra writes: > >>> * opncls.c (_bfd_delete_bfd): Check to see if section htab is >>> already freed. > > Alan> This part can be committed now if you like. > > The issue was double-freeing of section_htab. Because _bfd_delete_bfd > checks abfd->memory before freeing the section_htab, and because > _bfd_free_cached_info still calls objalloc_free, there's no need to do > this check. > Agreed. BTW, we still have a memory leak with bfd_zmalloc. But I don't know how serious it is. -- H.J.