cli/1815: GDB can crash with overridden "down" command

Tom Tromey tromey@redhat.com
Tue Sep 23 00:18:00 GMT 2008


The following reply was made to PR cli/1815; it has been noted by GNATS.

From: Tom Tromey <tromey@redhat.com>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: cli/1815: GDB can crash with overridden "down" command
Date: Mon, 22 Sep 2008 18:16:27 -0600

 The problem here is that 'do' is an alias for 'down' and points to the
 struct cmd_list_element for 'down'.  However, when defining the new
 'down', that cmd_list_element is freed.
 
 One fix would be to add reference counting to struct cmd_list_element.
 This approach would cause 'do' to remain an alias for the original
 'down'... I'm not sure this is the best UI.
 
 Tom



More information about the Gdb-prs mailing list