Add write barrier to protect proc reference from fiber; fix #3719

parent 464d3fc0
......@@ -125,6 +125,7 @@ fiber_init(mrb_state *mrb, mrb_value self)
ci = c->ci;
ci->target_class = p->target_class;
ci->proc = p;
mrb_field_write_barrier(mrb, (struct RBasic*)mrb_obj_ptr(self), (struct RBasic*)p);
ci->pc = p->body.irep->iseq;
ci->nregs = p->body.irep->nregs;
ci[1] = ci[0];
......
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