From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11046 invoked by alias); 28 Feb 2014 20:52:31 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 11020 invoked by uid 48); 28 Feb 2014 20:52:30 -0000 From: "dtaylor at emc dot com" To: gdb-prs@sourceware.org Subject: [Bug mi/16647] New: SIGSEGV in mi_cmd_trace_frame_collected Date: Fri, 28 Feb 2014 20:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: mi X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dtaylor at emc dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q1/txt/msg00316.txt.bz2 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.