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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 07 Sep 2014 20:09:25 +0300

> Date: Sun, 07 Sep 2014 00:20:33 -0700
> From: Paul Eggert <[email-masked]>
> 
> I installed the patch as trunk bzr 117829 and am marking this as done.

What is the rationale for tests such as this one in callproc.c:

    if (MAX_ALLOCA / sizeof *env - 2 < new_length)
      exec_failed (new_argv[0], ENOMEM);

MAX_ALLOCA is a relatively small number compared to the stack space
available on modern systems, so I see no reason to fail and exit in
these cases, it sounds too drastic.

Perhaps we should have a separate constant with platform-specific
value, if we want such tests.  Or maybe make them conditional on
ENABLE_CHECKING.