From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24376 invoked by alias); 29 Jun 2010 11:57:01 -0000 Received: (qmail 24366 invoked by uid 22791); 29 Jun 2010 11:57:00 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,TW_BJ,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jun 2010 11:56:56 +0000 Received: by fxm17 with SMTP id 17so2004551fxm.0 for ; Tue, 29 Jun 2010 04:56:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.80.8 with SMTP id h8mr2075626mul.90.1277812613797; Tue, 29 Jun 2010 04:56:53 -0700 (PDT) Received: by 10.103.249.7 with HTTP; Tue, 29 Jun 2010 04:56:53 -0700 (PDT) In-Reply-To: References: <74fef6df1002050423j71fcba21sd62fe421cf14adac@mail.gmail.com> Date: Tue, 29 Jun 2010 11:57:00 -0000 Message-ID: Subject: Re: gdb crash: double free with free_objfile From: Mathieu Lacage To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00142.txt.bz2 I attached a reduced testcase and this patch to: http://sourceware.org/bugzilla/show_bug.cgi?id=3D11766 enjoy ! Mathieu On Wed, Jun 23, 2010 at 5:15 PM, Mathieu Lacage wrote: > hi, > > On Fri, Feb 5, 2010 at 5:39 PM, Tom Tromey wrote: > >> Nope, right now objfile has the base address baked in to many things, >> e.g. symbol addresses or psymtabs_addrmap. =C2=A0I think we'd like to ch= ange >> this, so that we can share objfiles between inferiors, but nobody has >> tried to do that yet. =C2=A0I don't know how hard this would be. >> >> Your quickest route is probably a form of (a) -- change symbol_add_stub >> to check both the file name and the base address. > > It took me a long time to get back to this issue because I was busy > with a couple of other things but the attached patch which was > generated against CVS HEAD fixes the problem for me (i.e., avoids the > segfault in gdb and gets me readable backtraces). Is there something > else I could do to help get this issue fixed in mainline ? > > Mathieu > -- > Mathieu Lacage > --=20 Mathieu Lacage