This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb crash: double free with free_objfile
- From: Mathieu Lacage <mathieu dot lacage at gmail dot com>
- To: gdb at sourceware dot org
- Date: Tue, 29 Jun 2010 13:56:53 +0200
- Subject: Re: gdb crash: double free with free_objfile
- References: <74fef6df1002050423j71fcba21sd62fe421cf14adac@mail.gmail.com> <m3bpg3het5.fsf@fleche.redhat.com> <AANLkTimzl4KmA-bnXnLTnANEjmPG2CE7t06ggyi3ReV_@mail.gmail.com>
I attached a reduced testcase and this patch to:
http://sourceware.org/bugzilla/show_bug.cgi?id=11766
enjoy !
Mathieu
On Wed, Jun 23, 2010 at 5:15 PM, Mathieu Lacage
<mathieu.lacage@gmail.com> wrote:
> hi,
>
> On Fri, Feb 5, 2010 at 5:39 PM, Tom Tromey <tromey@redhat.com> wrote:
>
>> Nope, right now objfile has the base address baked in to many things,
>> e.g. symbol addresses or psymtabs_addrmap. ÂI think we'd like to change
>> this, so that we can share objfiles between inferiors, but nobody has
>> tried to do that yet. ÂI 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 <mathieu.lacage@gmail.com>
>
--
Mathieu Lacage <mathieu.lacage@gmail.com>