Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC PATCH] Introduce dwarf2_cu::get_builder
Date: Tue, 08 Jan 2019 19:56:00 -0000	[thread overview]
Message-ID: <e8c38e79-5292-85b1-4040-7a8e541faf94@redhat.com> (raw)
In-Reply-To: <87a7lqmhpg.fsf@tromey.com>

On 11/30/18 12:30 PM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
> 
> Keith> This patch is an attempt to deal with a variety of bugs reported where
> Keith> GDB segfaults attempting to access a dwarf2_cu's builder.  In certain
> Keith> circumstances, this builder can be NULL.
> 
> I think it would be good to describe one such case in the commit
> message.  I suppose there must be some spot that works on an inherited
> DIE in the context of its own CU?  I found myself wondering where.

I've changed the commit log to `hint' at a common pathway that this occurs
with a further suggestion to see either the test or the PR for a concrete
example:

    ... In certain
    circumstances, this builder can be NULL.  This is especially common
    when inheriting DIEs via inlined subroutines in other CUs.  The test
    case demonstrates one such situation reported by users.  See gdb/23773,
    rhbz1638798, and dups for other concrete examples.

That's my "picture is worth 1,000 words" description. Would that be sufficient?

> Keith> I'm submitting this as an RFC rather than an actual patch because of the
> Keith> lack of coverage testing for all the places where get_builder() is used.
> 
> I wouldn't be surprised if some of them aren't really reachable in the
> sense of ever being able to take the ancestor path.  I'm not concerned
> about needing tests for every single point.

Great.

> Keith> +# This tests a segfault that occurs when reading inline_subroutine DIEs
> 
> inlined_subroutine (missing the "d")

Fixed.
 
> Keith> +# bugzila mentioned above.  For clarity, some "superfluous" DIES have
> 
> Missing an "l" in bugzilla.

And fixed.

> The rest seems good to me.  Thank you for the patch, and for reducing
> and rewriting the test case like this.

Thank you for the review!

To save additional messages, I'll reply to the other "official" submission
message (https://sourceware.org/ml/gdb-patches/2018-11/msg00450.html) here:

Keith> +private:
Keith>    /* The symtab builder for this CU.  This is only non-NULL when full
Keith>       symbols are being read.  */
Keith> -  std::unique_ptr<buildsym_compunit> builder;
Keith> +  std::unique_ptr<buildsym_compunit> m_builder;

> Good idea, thanks for doing this.
>
> I think the previous nits still apply; though this email didn't include
> the test so I don't know for certain about those.

The test is unchanged, I simply forgot to include them (for $uknown reasons).

Keith


  reply	other threads:[~2019-01-08 19:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 18:57 Keith Seitz
2018-10-23 19:41 ` Sergio Durigan Junior
2018-11-06 21:34 ` Keith Seitz
2018-11-14 16:20   ` Keith Seitz
2018-11-16 13:19 ` Simon Marchi
2018-11-16 14:39   ` Keith Seitz
2018-11-30 20:30 ` Tom Tromey
2019-01-08 19:56   ` Keith Seitz [this message]
2019-01-16 16:38     ` Tom Tromey

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=e8c38e79-5292-85b1-4040-7a8e541faf94@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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