]> git.eshelyaron.com Git - emacs.git/commitdiff
* eval.c (call_debugger): When exiting the debugger, do not allow
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 10 Feb 2014 09:48:17 +0000 (13:48 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Mon, 10 Feb 2014 09:48:17 +0000 (13:48 +0400)
max_specpdl_size less than actual binding depth (Bug#16603).
(syms_of_eval): Adjust docstring.

src/ChangeLog
src/eval.c

index f65319c9fe7633021f9b030c1541d9aca9133f5f..fef7cf0e47f5cb9d5aea188a6a481a517912a9b0 100644 (file)
@@ -8,6 +8,9 @@
 
        * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
        and avoid warning.
+       * 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.
 
 2014-02-09  Lars Ingebrigtsen  <larsi@gnus.org>
 
index da68a3014dd0c0f12889caac25f30af1c12aeb2b..a96d413d09fc6494c9982d3046b05a29a8076a94 100644 (file)
@@ -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.