public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/16647] New: SIGSEGV in mi_cmd_trace_frame_collected
@ 2014-02-28 20:52 dtaylor at emc dot com
  0 siblings, 0 replies; only message in thread
From: dtaylor at emc dot com @ 2014-02-28 20:52 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 16647
           Summary: SIGSEGV in mi_cmd_trace_frame_collected
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: dtaylor at emc dot com

Under the following scenario I get a SIGSEGV in the function
mi_cmd_trace_frame_collected.

. connect to a remote target
. define a tracepoint
. at the tracepoint I collected $args and a global variable.
. tstart
. arrange for the tracepoint to be hit multiple times
. tstop
. tstatus -- verify that there are traceframes
. tfind 0 -- focus on the first fraceframe
. interpretetrr-exec mi -trace-frame-collected

At this point GDB will get a SIGSEGV in mi_cmd_trace_frame_collected.
In GDB 7.7, it's at line 2844, which is the line:

    for (i = 0; VEC_iterate (int, tinfo->tvars, i, tvar); i++)

Investigating, i is 0 and tinfo is NULL.

Looking back in the file, tinfo is assigned at line 2774:

  tinfo = get_traceframe_info ();

target_traceframe_info is called.  It is allowed to return NULL, and appraently
it DOES return NULL.  The function mi_cmd_trace_frame_collected does not check
for NULL, leading to the SIGSEGV.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-28 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-28 20:52 [Bug mi/16647] New: SIGSEGV in mi_cmd_trace_frame_collected dtaylor at emc dot com

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).