From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2364 invoked by alias); 17 Aug 2012 18:18:13 -0000 Received: (qmail 2348 invoked by uid 22791); 17 Aug 2012 18:18:11 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Aug 2012 18:17:44 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7HIHh5i016269 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Aug 2012 14:17:43 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7HIHfOH031628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 17 Aug 2012 14:17:42 -0400 From: Tom Tromey To: "H.J. Lu" Cc: Binutils Development Subject: Re: [PATCH 3/5] remove deleted BFDs from the archive cache References: <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> <20120817011722.GR3947@bubble.grove.modra.org> <87ipchlcua.fsf@fleche.redhat.com> <871uj5laxs.fsf@fleche.redhat.com> <87r4r5jveg.fsf@fleche.redhat.com> Date: Fri, 17 Aug 2012 19:03:00 -0000 In-Reply-To: (H. J. Lu's message of "Fri, 17 Aug 2012 10:21:47 -0700") Message-ID: <87has1jsca.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/msg00352.txt.bz2 >>>>> "HJ" == H J Lu writes: HJ> archive = bfd_openr (argv[1], NULL); HJ> for (last = bfd_openr_next_archived_file (archive, NULL); HJ> last; HJ> last = next) HJ> { HJ> next = bfd_openr_next_archived_file (archive, last); HJ> bfd_close (last); HJ> } HJ> will bfd_close (last) call free (abfd->arelt_data)? By 'abfd->arelt_data' I guess you mean 'last->arelt_data'. HJ> If it does, archive bfd will have bad member arelt_data. How do you figure? I tried this with my patch in place using my archive-reading program (the one I stuck in whatever PR it was), running under valgrind. It does the above. I didn't see any issue. I don't understand how such a problem could possibly arise. Tom