From: Joel Brobecker <brobecker@adacore.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Fix gdb/15827 (crash w/corrupt DWARF)
Date: Fri, 21 Mar 2014 17:14:00 -0000 [thread overview]
Message-ID: <20140321171453.GJ4282@adacore.com> (raw)
In-Reply-To: <532C6D4D.2050705@redhat.com>
Hi Keith,
> ChangeLog
> 2014-03-20 Keith Seitz <keiths@redhat.com>
>
> PR gdb/15827
> * dwarf2read.c (skip_one_die): Check that all relative-offset
> sibling DIEs fall within range of the current reader's buffer.
> (read_partial_die): Likewise.
>
> testsuite/ChangeLog
> 2014-03-20 Keith Seitz <keiths@redhat.com>
>
> PR gdb/15827
> * gdb.dwarf2/corrupt.c: New file.
> * gdb.dwarf2/corrupt.exp: New file.
LGTM! Just one tiny nit...
> +/* Dummy main function. */
> +
> +int
> +main()
Use "(void)" instead of "()". There was a recent policy clarification
regarding the CS to be using with testcases, and basically we decided
to try to follow the GCS as much as we reasonably could.
> +}
> +
> +# If we get here and gdb hasn't crashed, the tests pass.
> +pass "corrupt DWARF"
That's just me but I usually do a "print 1" test, just to make sure
that even if the testing framework did not detect the GDB process
dying, the "print 1" test definitely will. Not important on most,
if not all platforms, but ISTR some odd platforms where this helped.
That's just a suggestion, you don't have to follow it.
--
Joel
next prev parent reply other threads:[~2014-03-21 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 16:48 Keith Seitz
2014-03-21 17:14 ` Joel Brobecker [this message]
2014-03-21 17:26 ` Keith Seitz
2014-03-21 17:54 ` Joel Brobecker
2014-04-16 21:50 ` Keith Seitz
2014-03-21 19:27 ` Doug Evans
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=20140321171453.GJ4282@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.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