mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Preallocate SystemStackError; ref #3421
This commit is contained in:
@@ -162,7 +162,7 @@ stack_extend_alloc(mrb_state *mrb, int room, int keep)
|
||||
to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */
|
||||
if (size > MRB_STACK_MAX) {
|
||||
init_new_stack_space(mrb, room, keep);
|
||||
mrb_raise(mrb, E_SYSSTACK_ERROR, "stack level too deep. (limit=" MRB_STRINGIZE(MRB_STACK_MAX) ")");
|
||||
mrb_exc_raise(mrb, mrb_obj_value(mrb->stack_err));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user