summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-18 12:39:11 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-18 12:39:11 +0900
commit9201af7d36a6537c6d867d2b4386fe443edddcea (patch)
tree5f83c11a8773ff10ef806a9b71b5a326731acf11
parent2f8dbd8e5de04694ee2c2f7ad50418b184d2a08f (diff)
downloadmruby-9201af7d36a6537c6d867d2b4386fe443edddcea.tar.gz
mruby-9201af7d36a6537c6d867d2b4386fe443edddcea.zip
mark root fiber object; close #1865
-rw-r--r--src/gc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gc.c b/src/gc.c
index e87ed3f06..81b234d6f 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -697,6 +697,9 @@ root_scan_phase(mrb_state *mrb)
mrb_gc_mark(mrb, (struct RBasic*)mrb->exc);
mark_context(mrb, mrb->root_c);
+ if (mrb->root_c->fib) {
+ mrb_gc_mark(mrb, (struct RBasic*)mrb->root_c->fib);
+ }
if (mrb->root_c != mrb->c) {
mark_context(mrb, mrb->c);
}