diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-06-11 14:50:42 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-06-11 14:50:42 +0900 |
| commit | 23a4e7149dc4253caf5ed0a528ffe5c21c4afb80 (patch) | |
| tree | 1320fdd6f2f35e76cbb6313ee5539887e91e8d9c /mrbgems | |
| parent | a9b740b36b4518552d61f349afc02c325413d2ad (diff) | |
| download | mruby-23a4e7149dc4253caf5ed0a528ffe5c21c4afb80.tar.gz mruby-23a4e7149dc4253caf5ed0a528ffe5c21c4afb80.zip | |
Revert "No longer need to insert write barriers for fibers."
This reverts commit c6736357a72049a0eb2a31ccabcc3cd2baba7c9e.
The assumption was wrong and caused the issue; fix #4020
Diffstat (limited to 'mrbgems')
| -rw-r--r-- | mrbgems/mruby-fiber/src/fiber.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mrbgems/mruby-fiber/src/fiber.c b/mrbgems/mruby-fiber/src/fiber.c index b88fa4949..bff8726a7 100644 --- a/mrbgems/mruby-fiber/src/fiber.c +++ b/mrbgems/mruby-fiber/src/fiber.c @@ -175,6 +175,9 @@ fiber_check_cfunc(mrb_state *mrb, struct mrb_context *c) static void fiber_switch_context(mrb_state *mrb, struct mrb_context *c) { + if (mrb->c->fib) { + mrb_write_barrier(mrb, (struct RBasic*)mrb->c->fib); + } c->status = MRB_FIBER_RUNNING; mrb->c = c; } |
