From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28479 invoked by alias); 13 Dec 2003 22:42:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28470 invoked from network); 13 Dec 2003 22:42:29 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 13 Dec 2003 22:42:29 -0000 Received: by zenia.home (Postfix, from userid 5433) id 2DD3B20766; Sat, 13 Dec 2003 17:39:44 -0500 (EST) To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: protect breakpoint commands from being freed References: <3FDB60BE.1080308@gnu.org> From: Jim Blandy Date: Sat, 13 Dec 2003 22:42:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00364.txt.bz2 Jim Blandy writes: > Andrew Cagney writes: > > > > 2003-12-02 Jim Blandy > > > * breakpoint.c (bpstat_do_actions): To ensure that > > > clear_proceed_status doesn't free the command tree we're > > > evaluating out from under us, zero the bpstat's pointer to it, and > > > take care of freeing it ourselves. > > > * cli/cli-script.c (make_cleanup_free_command_lines): Make this > > > function externally visible. > > > * cli/cli-script.h (make_cleanup_free_command_lines): New > > > declaration. > > > > Didn't Don Howard fix this? > > I remember Don Howard doing something related to this, but I it must > have been a separate case. The regression test I posted makes today's > GDB crash. Okay, I looked this up. Don Howard posted a fix for a slightly different problem --- the case where the breakpoint is deleted by its own script. The eventual solution entailed giving the bpstat its own copy of the command tree. The problem my patch addresses is distinct: GDB is freeing the bpstat's copy before it is done with it.