From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22386 invoked by alias); 11 Feb 2010 22:29:06 -0000 Received: (qmail 22375 invoked by uid 22791); 11 Feb 2010 22:29:05 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Feb 2010 22:29:00 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1BMSpOL015576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 11 Feb 2010 17:28:51 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1BMSlJp009282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Feb 2010 17:28:50 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o1BMSls6005207; Thu, 11 Feb 2010 23:28:47 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o1BMSkvw005206; Thu, 11 Feb 2010 23:28:46 +0100 Date: Thu, 11 Feb 2010 22:29:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [ping] [patch] related_breakpoint stale ref crash fix Message-ID: <20100211222846.GA4761@host0.dyn.jankratochvil.net> References: <20091223224814.GA24272@host0.dyn.jankratochvil.net> <20100211152551.GA14952@host0.dyn.jankratochvil.net> <201002111917.05254.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201002111917.05254.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00307.txt.bz2 On Thu, 11 Feb 2010 20:17:05 +0100, Pedro Alves wrote: > On Thursday 11 February 2010 15:25:51, Jan Kratochvil wrote: > > 2009-12-23  Jan Kratochvil   > > > >         * breakpoint.c (delete_breakpoint related_breakpoint != NULL>): > >         New. > > Yeah, OK. Checked-in. > I think you wanted: > > * breakpoint.c (delete_breakpoint) related_breakpoint != NULL>: > > It's 6.8.5 in the GCS. I have remembered it wrong, fixed. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2010-02/msg00081.html --- src/gdb/ChangeLog 2010/02/11 21:45:25 1.11348 +++ src/gdb/ChangeLog 2010/02/11 22:25:26 1.11349 @@ -1,3 +1,8 @@ +2010-02-11 Jan Kratochvil + + * breakpoint.c (delete_breakpoint) related_breakpoint != NULL>: + New. + 2010-02-11 Pedro Alves * ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out on --- src/gdb/breakpoint.c 2010/01/26 23:56:53 1.452 +++ src/gdb/breakpoint.c 2010/02/11 22:25:27 1.453 @@ -8691,6 +8691,16 @@ if (bpt->type == bp_none) return; + /* At least avoid this stale reference until the reference counting of + breakpoints gets resolved. */ + if (bpt->related_breakpoint != NULL) + { + gdb_assert (bpt->related_breakpoint->related_breakpoint == bpt); + bpt->related_breakpoint->disposition = disp_del_at_next_stop; + bpt->related_breakpoint->related_breakpoint = NULL; + bpt->related_breakpoint = NULL; + } + observer_notify_breakpoint_deleted (bpt->number); if (breakpoint_chain == bpt)