GNU bug report logs - #18410
Use SAFE_ALLOCA etc. to avoid unbounded stack allocation.

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Fri, 5 Sep 2014 06:10:02 UTC

Severity: wishlist

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18410 <at> debbugs.gnu.org
Subject: bug#18410: Use SAFE_ALLOCA etc. to avoid unbounded stack allocation.
Date: Sun, 07 Sep 2014 20:09:25 +0300
> Date: Sun, 07 Sep 2014 00:20:33 -0700
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> 
> 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.




This bug report was last modified 10 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.