From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26745 invoked by alias); 28 Apr 2013 16:32:24 -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 26722 invoked by uid 48); 28 Apr 2013 16:32:24 -0000 From: "dave at treblig dot org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/15413] New: reliable seg in gdb/breakpoint.c:condition_completer Date: Sun, 28 Apr 2013 16:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dave at treblig dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00161.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15413 Bug #: 15413 Summary: reliable seg in gdb/breakpoint.c:condition_completer Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: breakpoints AssignedTo: unassigned@sourceware.org ReportedBy: dave@treblig.org Classification: Unclassified Hi, There is a trivially repeatable seg in condition_completer on head; this was originally filed by Borim here; I as triaging it: https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1171511 I've repeated this on CVS head; to trigger: (Original reporter) 1. Start gdb with any program you want to debug 2. set a pending breakpoint, e.g. "b nofile.cxx:54" 3. type "condition 1" + Tab This seems to come down to gdb/breakpoint.c:condition_completer which has the code: ALL_BREAKPOINTS (b) { 1016 int single = b->loc->next == NULL; struct bp_location *loc; int count = 1; for (loc = b->loc; loc; loc = loc->next) { That 'int single' line is where it segs because b->loc is NULL; I think turning it into something like int single; ... single = (b->loc)?(b->loc->next==NEXT):1 would do it, but I've not really dug into the datastructure to check what else that might do. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.