From e6e8c9339d99edde4297ad748c73d4af3d4463de Mon Sep 17 00:00:00 2001 From: Bruce Pascoe Date: Mon, 31 Aug 2015 17:32:22 -0400 Subject: [PATCH] Strengthen 10-recursion guarantee in error handling --- src/duk_error_throw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duk_error_throw.c b/src/duk_error_throw.c index 617db9b6..15fae346 100644 --- a/src/duk_error_throw.c +++ b/src/duk_error_throw.c @@ -47,10 +47,10 @@ DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code) * for, e.g. a print() call at the deepest level. */ DUK_ASSERT(thr->callstack_max == DUK_CALLSTACK_DEFAULT_MAX); - thr->callstack_max = DUK_CALLSTACK_DEFAULT_MAX + 11; + thr->callstack_max = DUK_CALLSTACK_DEFAULT_MAX + DUK_CALLSTACK_GROW_STEP + 11; } - DUK_ASSERT(thr->callstack_max == DUK_CALLSTACK_DEFAULT_MAX + 11); /* just making sure */ + DUK_ASSERT(thr->callstack_max == DUK_CALLSTACK_DEFAULT_MAX + DUK_CALLSTACK_GROW_STEP + 11); /* just making sure */ /* Sync so that augmentation sees up-to-date activations, NULL * thr->ptr_curr_pc so that it's not used if side effects occur