This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/19374] New: gdb/procfs.c: procfs_xfer_partial null-ptr de-reference


https://sourceware.org/bugzilla/show_bug.cgi?id=19374

            Bug ID: 19374
           Summary: gdb/procfs.c: procfs_xfer_partial null-ptr
                    de-reference
           Product: gdb
           Version: 7.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: phantall at gmail dot com
  Target Milestone: ---

This was found on sparc solaris 10.

When gdb is ran with **--interpreter mi2 --nx** (this is how Eclipse CDT runs
it under Solaris) I'm getting a segfault ingdb/procfs.c:3999 when
"list-thread-groups --available" is sent to gdb.

This is happening when list_available_thread_groups() (gdb/mi/mi-main.c:782)
calls get_osdata( "processes" ).

There's a few issues:

* No check to make sure ops->beneath != NULL
* ops->beneath->to_xfer_partial is going to be the same function (except for
remote debugging perhaps) -- namely procfs_xfer_partial().  If ops->beneath !=
NULL, this will result in recursion until either ops->beneath **is** null, or
the stack grows too large.
* list_available_thread_groups() expects get_osdata to throw() if it's unable
to do anything meaningful

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]