This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: allocate namecopy on heap, not stack


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]