From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9758 invoked by alias); 29 Apr 2005 23:56:54 -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 9697 invoked from network); 29 Apr 2005 23:56:50 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 29 Apr 2005 23:56:50 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DRfLm-0003QB-0q; Fri, 29 Apr 2005 19:56:50 -0400 Date: Fri, 29 Apr 2005 23:56:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: PATCH: allocate namecopy on heap, not stack Message-ID: <20050429235649.GA13136@nevyn.them.org> Mail-Followup-To: Jim Blandy , gdb-patches@sources.redhat.com References: <20050429213922.GA9371@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00441.txt.bz2 On Fri, Apr 29, 2005 at 05:52:18PM -0500, Jim Blandy wrote: > Certainly --- did you see this? > > + > + /* A temporary buffer for identifiers, so we can null-terminate them. > + > + We allocate this with xrealloc. parse_exp_1 used to allocate with > + alloca, using the size of the whole expression as a conservative > + estimate of the space needed. However, macro expansion can > + introduce names longer than the original expression; there's no > + practical way to know beforehand how large that might be. */ > + char *namecopy; > + size_t namecopy_size; No, I didn't. Thanks for explaining. -- Daniel Jacobowitz CodeSourcery, LLC