Raise SystemStackError if mruby VM stack expansion fails
MODIFY
src/vm.c
src/vm.c
@@ -197,7 +197,7 @@ stack_extend_alloc(mrb_state *mrb, mrb_int room)
size += room;
#endif
- newstack = (mrb_value *)mrb_realloc(mrb, mrb->c->stbase, sizeof(mrb_value) * size);
+ newstack = (mrb_value *)mrb_realloc_simple(mrb, mrb->c->stbase, sizeof(mrb_value) * size);
if (newstack == NULL) {
mrb_exc_raise(mrb, mrb_obj_value(mrb->stack_err));
}

Raise SystemStackError if mruby VM stack expansion fails