diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2014-02-10 13:48:17 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2014-02-10 13:48:17 +0400 |
commit | 575593db501105518d4715e4c2e8d637f9e7208a (patch) | |
tree | 88052471dbb7ba0ee5c0beceed2ff98059fe71d5 /src/eval.c | |
parent | 2b44e4584b8b113a8fbfcca6e8980383a77a9717 (diff) |
* eval.c (call_debugger): When exiting the debugger, do not allow
max_specpdl_size less than actual binding depth (Bug#16603).
(syms_of_eval): Adjust docstring.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index da68a3014d..a96d413d09 100644 --- a/src/eval.c +++ b/src/eval.c @@ -283,7 +283,9 @@ call_debugger (Lisp_Object arg) bool debug_while_redisplaying; ptrdiff_t count = SPECPDL_INDEX (); Lisp_Object val; - EMACS_INT old_max = max_specpdl_size, old_depth = max_lisp_eval_depth; + EMACS_INT old_depth = max_lisp_eval_depth; + /* Do not allow max_specpdl_size less than actual depth (Bug#16603). */ + EMACS_INT old_max = max (max_specpdl_size, count); if (lisp_eval_depth + 40 > max_lisp_eval_depth) max_lisp_eval_depth = lisp_eval_depth + 40; @@ -3721,7 +3723,9 @@ If Lisp code tries to increase the total number past this amount, an error is signaled. You can safely use a value considerably larger than the default value, if that proves inconveniently small. However, if you increase it too far, -Emacs could run out of memory trying to make the stack bigger. */); +Emacs could run out of memory trying to make the stack bigger. +Note that this limit may be silently increased by the debugger +if `debug-on-error' or `debug-on-quit' is set. */); DEFVAR_INT ("max-lisp-eval-depth", max_lisp_eval_depth, doc: /* Limit on depth in `eval', `apply' and `funcall' before error. |