Skip to content

Commit

Permalink
Mark the root context in final_marking_phase.
Browse files Browse the repository at this point in the history
Because the root context cannot be marked from fibers.
  • Loading branch information
matz committed Jun 16, 2017
1 parent 8daabe7 commit 819ccd3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gc.c
Expand Up @@ -997,6 +997,7 @@ final_marking_phase(mrb_state *mrb, mrb_gc *gc)
{ {
mrb_gc_mark_gv(mrb); mrb_gc_mark_gv(mrb);
mark_context(mrb, mrb->c); mark_context(mrb, mrb->c);
mark_context(mrb, mrb->root_c);
mrb_gc_mark(mrb, (struct RBasic*)mrb->exc); mrb_gc_mark(mrb, (struct RBasic*)mrb->exc);
gc_mark_gray_list(mrb, gc); gc_mark_gray_list(mrb, gc);
mrb_assert(gc->gray_list == NULL); mrb_assert(gc->gray_list == NULL);
Expand Down

0 comments on commit 819ccd3

Please sign in to comment.