aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2019-10-14 14:52:58 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2019-10-28 13:09:10 -0700
commit6147fa82a923e7318f493857023006801ed25eb5 (patch)
tree1b93d5b01162a5a81100a7ea7a7ff8779ecf6b83 /cont.c
parentbbf3de22b6654642c923884b9e186e6412f1ba6a (diff)
downloadruby-6147fa82a923e7318f493857023006801ed25eb5.tar.gz
Fix continuation mark / compact
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cont.c b/cont.c
index 832068f42e..bdd775a8cb 100644
--- a/cont.c
+++ b/cont.c
@@ -847,6 +847,9 @@ cont_compact(void *ptr)
{
rb_context_t *cont = ptr;
+ if (cont->self) {
+ cont->self = rb_gc_location(cont->self);
+ }
cont->value = rb_gc_location(cont->value);
rb_execution_context_update(&cont->saved_ec);
}
@@ -857,6 +860,9 @@ cont_mark(void *ptr)
rb_context_t *cont = ptr;
RUBY_MARK_ENTER("cont");
+ if (cont->self) {
+ rb_gc_mark_movable(cont->self);
+ }
rb_gc_mark_movable(cont->value);
rb_execution_context_mark(&cont->saved_ec);