Mercurial > hg > xemacs-beta
diff src/eval.c @ 1951:31d5f86eb303
[xemacs-hg @ 2004-03-15 18:01:37 by james]
Break infinite loop when out of specpdl space.
author | james |
---|---|
date | Mon, 15 Mar 2004 18:01:40 +0000 |
parents | 21549d437f09 |
children | f4702ef3fd36 |
line wrap: on
line diff
--- a/src/eval.c Sun Mar 14 22:50:33 2004 +0000 +++ b/src/eval.c Mon Mar 15 18:01:40 2004 +0000 @@ -5707,10 +5707,14 @@ max_specpdl_size = min_max_specpdl_size; if (size_needed >= max_specpdl_size) { - if (!NILP (Vdebug_on_error) || - !NILP (Vdebug_on_signal)) - /* Leave room for some specpdl in the debugger. */ - max_specpdl_size = size_needed + 100; + /* Leave room for some specpdl in the debugger. */ + max_specpdl_size = size_needed + 100; + if (max_specpdl_size > specpdl_size) + { + specpdl_size = max_specpdl_size; + XREALLOC_ARRAY (specpdl, struct specbinding, specpdl_size); + specpdl_ptr = specpdl + specpdl_depth(); + } signal_continuable_error (Qstack_overflow, "Variable binding depth exceeds max-specpdl-size", Qunbound);