Subject: Re: bug#18410: Use SAFE_ALLOCA etc. to avoid unbounded stack allocation.

From: Eli Zaretskii <[email-masked]>
Date: Mon, 08 Sep 2014 05:35:28 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Sun, 07 Sep 2014 22:22:23 -0400
> 
> > Usually MAX_ALLOCA-related code falls back on malloc, and does not exit
> > merely because a request was larger.  callproc.c's child_setup function is
> 
> MAX_ALLOCA is chosen small so that we can allocate several/many objects
> of size MAX_ALLOCA.  Whereas in this case, after this alloca we're not
> expected to use up the stack much more (we're about to `exec' anyway,
> right?).  So MAX_ALLOCA is much too conservative for this case.

Indeed, I agree.  So I think we should increase the limit in
callproc.c, especially if we are going to keep the exit with failed
status when the limit is exceeded.