From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11808 invoked by alias); 10 Aug 2009 03:15:02 -0000 Received: (qmail 11709 invoked by uid 22791); 10 Aug 2009 03:15:01 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Aug 2009 03:14:51 +0000 Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id n7A3ElOH014344 for ; Mon, 10 Aug 2009 04:14:48 +0100 Received: from qyk15 (qyk15.prod.google.com [10.241.83.143]) by zps37.corp.google.com with ESMTP id n7A3Ei9L015478 for ; Sun, 9 Aug 2009 20:14:44 -0700 Received: by qyk15 with SMTP id 15so2282814qyk.16 for ; Sun, 09 Aug 2009 20:14:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.67.207 with SMTP id s15mr2766662qai.128.1249874084293; Sun, 09 Aug 2009 20:14:44 -0700 (PDT) In-Reply-To: <20090809213710.GA14354@host0.dyn.jankratochvil.net> References: <20090809213710.GA14354@host0.dyn.jankratochvil.net> Date: Mon, 10 Aug 2009 08:51:00 -0000 Message-ID: <8ac60eac0908092014p7fd44e01o67b32a312b950923@mail.gmail.com> Subject: Re: [patch] Assertion for a regression by gdb_bfd_unref From: Paul Pluzhnikov To: Jan Kratochvil Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00138.txt.bz2 On Sun, Aug 9, 2009 at 2:37 PM, Jan Kratochvil w= rote: > Going to post now patches to binutils for bfd/ to fix the bfd_usrdata > initialization. I thought I'd checked that it *is* initialized. In bfd/opncls.c: /* Return a new BFD. All BFD's are allocated through this routine. */ bfd * _bfd_new_bfd (void) ... nbfd->usrdata =3D NULL; Confused. Ah! bfd uses usrdata internally despite declaring them to be for application use: coff-stgo32.c:#define bfd_coff_go32stub bfd_usrdata coff-stgo32.c: bfd_coff_go32stub (abfd) =3D (PTR) bfd_alloc (abfd, (bfd_size_type) STUBSIZE); How naughty! > =A0 =A0 =A0 =A0* objfiles.c (gdb_bfd_unref): Use the bfd_usrdata accessor. > =A0 =A0 =A0 =A0* solib.c (symbol_add_stub): Likewise. > =A0 =A0 =A0 =A0* symfile.c (symfile_bfd_open): Assert BFD_USRDATA is NULL. Thanks for fixing this. --=20 Paul Pluzhnikov