should check crossing C boudary from resume

parent f911b235
......@@ -154,7 +154,13 @@ fiber_resume(mrb_state *mrb, mrb_value self)
struct mrb_context *c = fiber_check(mrb, self);
mrb_value *a;
int len;
mrb_callinfo *ci;
for (ci = c->ci; ci >= c->cibase; ci--) {
if (ci->acc < 0) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "can't cross C function boundary");
}
}
if (c->status == MRB_FIBER_RESUMED) {
mrb_raise(mrb, E_RUNTIME_ERROR, "double resume");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment