Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jason Richards <jsn.richards@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: infinite loop processing siblings - dwarf2reader - dwarf 3 debug
Date: Mon, 26 Oct 2009 21:13:00 -0000	[thread overview]
Message-ID: <m3my3dx3i2.fsf@fleche.redhat.com> (raw)
In-Reply-To: <9c25d2960910242124p6dfc4f6an72811d4105711fa2@mail.gmail.com> 	(Jason Richards's message of "Sat, 24 Oct 2009 21:24:26 -0700")

>>>>> "Jason" == Jason Richards <jsn.richards@gmail.com> writes:

Jason> I encountered a problem where GDB gets stuck in an infinite loop
Jason> processing dwarf 3 debug information.  Turns out the producer has
Jason> placed a sibling attribute in a die in a comp unit which
Jason> references a previous die in the comp unit.

This does not sound like valid DWARF to me.  Section 1.9 makes it sound
as though the only valid value is the DIE's next sibling.

Jason> It seams to me the appropriate fix for this problem is to change
Jason> "locate_pdi_sibling" to first return the location past the
Jason> children, before returning sibling information, which fixes this
Jason> particular problem.

Jason> Is there something I am not thinking about?

I don't know why the code is the way it is; I assume for performance but
I have not looked into it at all.

How about also rejecting a DW_AT_sibling that points to an earlier DIE?

Tom


  reply	other threads:[~2009-10-26 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-25  4:24 Jason Richards
2009-10-26 21:13 ` Tom Tromey [this message]
2009-10-26 21:50   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3my3dx3i2.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jsn.richards@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox