From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26344 invoked by alias); 11 Dec 2002 18:01:04 -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 26335 invoked from network); 11 Dec 2002 18:01:01 -0000 Received: from unknown (HELO dc-mx13.cluster1.charter.net) (209.225.8.23) by sources.redhat.com with SMTP; 11 Dec 2002 18:01:01 -0000 Received: from [66.189.46.2] (HELO platinum.localnet) by dc-mx13.cluster1.charter.net (CommuniGate Pro SMTP 3.5.9) with ESMTP id 17106342; Wed, 11 Dec 2002 13:01:00 -0500 Date: Wed, 11 Dec 2002 10:20:00 -0000 Subject: Re: [RFC/RFA] GDB crash when using command lines due to memory corruption Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v543) Cc: gdb-patches@sources.redhat.com To: Joel Brobecker From: Klee Dienes In-Reply-To: <20021211173805.GG25575@gnat.com> Message-Id: <8096FEF2-0D32-11D7-9BDD-00039396EEB8@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2002-12/txt/msg00360.txt.bz2 A safer change for 5.3 might be the patch I submitted on October 30th. http://sources.redhat.com/ml/gdb-patches/2002-10/msg00586.html Rather than deal with sharing the command-line structure, I just updated bpstat_copy to match its comment, and do a deep copy of the command lines as well as the value. I don't really have a strong opinion about copying the command lines vs. managing them the way Joel proposes, although my patch does have the argument of simplicity going for it. On the other hand, if/when we go to a more sophistiated command-line evaluator, we'll probably want the command body to be some opaque and externally managed structure anyway. Whichever patch we end up taking, though, we should be sure to update the comment in bpstat_copy and add my proposed change to the test suite.