summaryrefslogtreecommitdiff
path: root/libguile/eval.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@oblong.net>2009-06-10 10:51:02 +0200
committerAndy Wingo <wingo@oblong.net>2009-06-10 10:53:22 +0200
commitde3d1fc9884ae587862ed119700fcc59c1452407 (patch)
treec7d47d9dea7af4e469efff9d2d732f7bbb3428e6 /libguile/eval.c
parent9ea12179fffffa8e1ba12cde4a10c35504a80012 (diff)
downloadguile-de3d1fc9884ae587862ed119700fcc59c1452407.tar.gz
bump default stack limit to 160000 words
* libguile/eval.c (scm_debug_opts): Up the default stack limit by a factor of 4. Psyntax expansions currently bounce back and forth between the VM and the interpreter, due to `map'. (Hopefully that won't be the case in the future, when have map in scheme, and we get an inliner.) Anyway when expanding a big nested expression, as for example in (language ecmascript compile-ghil) -- the pmatch code ends up being super-nested -- we can consume loads o stack. So given that on desktop machines, where rlimit is likely to be unset, default rlimits are around 8 or 10 MB or so, let's bump up our default limit to 640KB (on 32-bit). Should be enough for anyone. See http://thread.gmane.org/gmane.lisp.guile.devel/8599/focus=8662 for more info. Thanks to Mark H. Weaver for the diagnosis!
Diffstat (limited to 'libguile/eval.c')
-rw-r--r--libguile/eval.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libguile/eval.c b/libguile/eval.c
index 05af5a1c5..574ab4740 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -3028,8 +3028,19 @@ scm_t_option scm_debug_opts[] = {
{ SCM_OPTION_INTEGER, "depth", 20, "Maximal length of printed backtrace." },
{ SCM_OPTION_BOOLEAN, "backtrace", 0, "Show backtrace on error." },
{ SCM_OPTION_BOOLEAN, "debug", 0, "Use the debugging evaluator." },
+ /* This default stack limit will be overridden by debug.c:init_stack_limit(),
+ if we have getrlimit() and the stack limit is not INFINITY. But it is still
+ important, as some systems have both the soft and the hard limits set to
+ INFINITY; in that case we fall back to this value.
- { SCM_OPTION_INTEGER, "stack", 40000, "Stack size limit (measured in words; 0 = no check)." },
+ The situation is aggravated by certain compilers, which can consume
+ "beaucoup de stack", as they say in France.
+
+ See http://thread.gmane.org/gmane.lisp.guile.devel/8599/focus=8662 for
+ more discussion. This setting is 640 KB on 32-bit arches (should be enough
+ for anyone!) or a whoppin' 1280 KB on 64-bit arches.
+ */
+ { SCM_OPTION_INTEGER, "stack", 160000, "Stack size limit (measured in words; 0 = no check)." },
{ SCM_OPTION_SCM, "show-file-name", (unsigned long)SCM_BOOL_T,
"Show file names and line numbers "
"in backtraces when not `#f'. A value of `base' "