mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 06:09:18 +02:00
recovering gracefully from out-of-stack-space errors
This commit is contained in:
parent
f4bb578d4d
commit
2ddafc2239
2 changed files with 6 additions and 3 deletions
6
eval.c
6
eval.c
|
@ -1313,8 +1313,10 @@ sexp sexp_vm (sexp ctx, sexp proc) {
|
|||
goto make_call;
|
||||
case OP_CALL:
|
||||
#if USE_CHECK_STACK
|
||||
if (top+16 >= SEXP_INIT_STACK_SIZE)
|
||||
errx(70, "out of stack space at %ld", top);
|
||||
if (top+16 >= SEXP_INIT_STACK_SIZE) {
|
||||
_ARG1 = sexp_global(ctx, SEXP_G_OOS_ERROR);
|
||||
goto end_loop;
|
||||
}
|
||||
#endif
|
||||
i = sexp_unbox_fixnum(_WORD0);
|
||||
tmp1 = _ARG1;
|
||||
|
|
|
@ -668,7 +668,8 @@ enum sexp_context_globals {
|
|||
#if ! USE_GLOBAL_SYMBOLS
|
||||
SEXP_G_SYMBOLS,
|
||||
#endif
|
||||
SEXP_G_OOM_ERROR,
|
||||
SEXP_G_OOM_ERROR, /* out of memory exception object */
|
||||
SEXP_G_OOS_ERROR, /* out of stack exception object */
|
||||
SEXP_G_QUOTE_SYMBOL,
|
||||
SEXP_G_QUASIQUOTE_SYMBOL,
|
||||
SEXP_G_UNQUOTE_SYMBOL,
|
||||
|
|
Loading…
Add table
Reference in a new issue