From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: Pedro Alves <palves@redhat.com>,
Jan Kratochvil <jan.kratochvil@redhat.com>,
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: [PATCH 0/3] Fix for PR 17808 and some related changes
Date: Thu, 15 Jan 2015 15:22:00 -0000 [thread overview]
Message-ID: <1421335311-4239-1-git-send-email-arnez@linux.vnet.ibm.com> (raw)
As seen in PR 17808, a test case with a forged (invalid) core file can
crash GDB with an assertion failure when a register section has the
wrong size. This patch series is about improving GDB's behavior in
such cases: Patch 1 fixes the reported problem for i386 as well as for
other targets; patch 2 avoids out-of-bounds accesses when an x86
".reg-xstate" section is too short, and patch 3 adds a warning when a
core file register section is larger than expected.
This is based on the "lazy approach" suggested here:
https://sourceware.org/ml/gdb-patches/2015-01/msg00229.html
OK to apply?
Andreas Arnez (3):
[PR corefiles/17808] Fix internal error when core file section is too
big
x86: Use correct .reg-xstate section size
Warn if core file register section is larger than expected
gdb/alphanbsd-tdep.c | 4 +++-
gdb/amd64-linux-tdep.c | 2 +-
gdb/amd64-tdep.c | 4 ++--
gdb/armbsd-tdep.c | 4 +++-
gdb/corelow.c | 5 +++++
gdb/gdbarch.h | 6 ++++++
gdb/gdbarch.sh | 6 ++++++
gdb/hppa-hpux-tdep.c | 4 +++-
gdb/hppaobsd-tdep.c | 4 +++-
gdb/i386-linux-tdep.c | 3 +--
gdb/i386-tdep.c | 8 ++++----
gdb/m68kbsd-tdep.c | 4 +++-
gdb/mips-linux-tdep.c | 16 ++++++++--------
gdb/mipsnbsd-tdep.c | 4 +++-
gdb/mn10300-linux-tdep.c | 8 ++++----
gdb/regset.h | 7 +++++++
16 files changed, 62 insertions(+), 27 deletions(-)
--
1.8.4.2
next reply other threads:[~2015-01-15 15:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 15:22 Andreas Arnez [this message]
2015-01-15 15:22 ` [PATCH 1/3] [PR corefiles/17808] Fix internal error when core file section is too big Andreas Arnez
2015-01-15 15:23 ` [PATCH 2/3] x86: Use correct .reg-xstate section size Andreas Arnez
2015-01-15 15:24 ` [PATCH 3/3] Warn if core file register section is larger than expected Andreas Arnez
2015-01-22 11:38 ` [PING] [PATCH 0/3] Fix for PR 17808 and some related changes Andreas Arnez
2015-01-23 16:14 ` Pedro Alves
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=1421335311-4239-1-git-send-email-arnez@linux.vnet.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=mark.kettenis@xs4all.nl \
--cc=palves@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).