[前][次][番号順一覧][スレッド一覧]

ruby-changes:58478

From: Aaron <ko1@a...>
Date: Tue, 29 Oct 2019 05:09:31 +0900 (JST)
Subject: [ruby-changes:58478] 6147fa82a9 (master): Fix continuation mark / compact

https://git.ruby-lang.org/ruby.git/commit/?id=6147fa82a9

From 6147fa82a923e7318f493857023006801ed25eb5 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Mon, 14 Oct 2019 14:52:58 -0700
Subject: Fix continuation mark / compact


diff --git a/cont.c b/cont.c
index 832068f..bdd775a 100644
--- a/cont.c
+++ b/cont.c
@@ -847,6 +847,9 @@ cont_compact(void *ptr) https://github.com/ruby/ruby/blob/trunk/cont.c#L847
 {
     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) https://github.com/ruby/ruby/blob/trunk/cont.c#L860
     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);
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]