mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Call write barriers for stack-modified fibers; fix #3699
This commit is contained in:
@@ -867,7 +867,12 @@ mrb_vm_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int stac
|
||||
if (c->ci - c->cibase > cioff) {
|
||||
c->ci = c->cibase + cioff;
|
||||
}
|
||||
mrb->c = c;
|
||||
if (mrb->c != c) {
|
||||
if (mrb->c->fib) {
|
||||
mrb_write_barrier(mrb, (struct RBasic*)mrb->c->fib);
|
||||
}
|
||||
mrb->c = c;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1819,6 +1824,9 @@ RETRY_TRY_BLOCK:
|
||||
else {
|
||||
struct mrb_context *c = mrb->c;
|
||||
|
||||
if (c->fib) {
|
||||
mrb_write_barrier(mrb, (struct RBasic*)c->fib);
|
||||
}
|
||||
mrb->c = c->prev;
|
||||
c->prev = NULL;
|
||||
goto L_RAISE;
|
||||
|
||||
Reference in New Issue
Block a user