This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Prevent inline function parameters from crashing the DWARF reader


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> However, as demonstrated in this Fedora bugzilla:
Keith>   https://bugzilla.redhat.com/show_bug.cgi?id=1638798

Keith> the abstract_origin of the parameter DIE may be in an entirely different
Keith> CU.  This CU will have no builder defined for it, so the call to
Keith> get_current_context_stack is made on an uninitialized builder, and GDB
Keith> segfaults.

I was curious what happened before, so I checked out the commit
before 804d27291b2922f01fe5cc2d9ae759533d4a2f6f, and ran it on the
executable in that bug.

I set a breakpoint conditional on curr==0 and it never hit.

Now, I am not totally sure that this was correct before, but I suppose
what was going on was that the earlier code was installing these symbols
into the referencing CU's symtab.

Abstractly, at least, that seems reasonable.  So maybe that approach
should be taken again.

Also, when I look at new_symbol, I see a bunch of uses of cu->builder,
so I wonder if there are ways to make those spots crash as well.
So maybe this indicates some different approach is needed as well.

Sorry about this.  I didn't anticipate this at all.  I can try to take
it over if you'd like.

Maybe one idea would be to temporarily set the referenced CU's builder
to the referencing CU's builder somehow.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]