From: Brian Vandenberg <phantall@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH][PING][PR gdb/19374] null-ptr dereference on solaris when running get_osdata( "processes" )
Date: Tue, 05 Jan 2016 17:30:00 -0000 [thread overview]
Message-ID: <CAEJ-0i_Buu3GHdPF-RPj4Q5rJKjzRXS5mqOcBEbigqE3Oa+SZg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 656 bytes --]
This patch is to address bug 19374 on solaris.
When running gdb under eclipse/CDT on Solaris, eclipse
runs gdb with:
gdb --interpreter mi2 --nx
During execution it ends up sending the following string to gdb:
16-list-thread-groups --available
... at which point gdb crashes.
There's a few issues I see with this function, not all of which I'm
prepared to deal with competently.
This patch partially reverts the change in the following:
http://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=e75fdfcad1c868eae5396a95be9dd18010406306#patch4
... by re-adding the check for ops->beneath != NULL and returning
TARGET_XFER_E_IO.
-brian
[-- Attachment #2: gdb-19374-patch.txt --]
[-- Type: text/plain, Size: 773 bytes --]
gdb/Changelog:
2015-12-16 Brian Vandenberg <phantall@gmail.com>
PR gdb/19374
* gdb/procfs.c (procfs_xfer_partial): Added check for ops->beneath != NULL
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 7b7ff45..7c08bf4 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ --3954,9 +3954,12 @@ procfs_xfer_partial (struct target_ops *ops, enum target_object object,
#endif
default:
- return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
+ if( ops->beneath )
+ return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
readbuf, writebuf, offset, len,
xfered_len);
+ else
+ return TARGET_XFER_E_IO;
}
}
next reply other threads:[~2016-01-05 17:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 17:30 Brian Vandenberg [this message]
2018-08-07 19:29 Brian Vandenberg
2018-08-07 21:37 ` Simon Marchi
2018-08-08 15:06 ` 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=CAEJ-0i_Buu3GHdPF-RPj4Q5rJKjzRXS5mqOcBEbigqE3Oa+SZg@mail.gmail.com \
--to=phantall@gmail.com \
--cc=gdb-patches@sourceware.org \
/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).