bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#18410: Use SAFE_ALLOCA etc. to avoid unbounded stack allocation.
Date: Mon, 08 Sep 2014 05:35:28 +0300

> From: Stefan Monnier <address@hidden>
> Cc: Eli Zaretskii <address@hidden>,  address@hidden
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]