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

ruby-changes:64989

From: Aaron <ko1@a...>
Date: Fri, 22 Jan 2021 04:20:53 +0900 (JST)
Subject: [ruby-changes:64989] 32b7dcfb56 (master): Fix more assumptions about the read barrier

https://git.ruby-lang.org/ruby.git/commit/?id=32b7dcfb56

From 32b7dcfb56a417c1d1c354102351fc1825d653bf Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Thu, 21 Jan 2021 11:19:44 -0800
Subject: Fix more assumptions about the read barrier

This is a continuation of 0130e17a410d60a10e7041ce98748b8de6946971.  We
need to always use the read barrier

diff --git a/gc.c b/gc.c
index 998f086..73f8bcc 100644
--- a/gc.c
+++ b/gc.c
@@ -4489,11 +4489,6 @@ static VALUE gc_move(rb_objspace_t *objspace, VALUE scan, VALUE free); https://github.com/ruby/ruby/blob/trunk/gc.c#L4489
 static void
 lock_page_body(rb_objspace_t *objspace, struct heap_page_body *body)
 {
-    /* If this is an explicit compaction (GC.compact), we don't need a read
-     * barrier, so just return early. */
-    if (objspace->flags.during_compacting >> 1) {
-        return;
-    }
 #if defined(_WIN32)
     DWORD old_protect;
 
@@ -4511,11 +4506,6 @@ lock_page_body(rb_objspace_t *objspace, struct heap_page_body *body) https://github.com/ruby/ruby/blob/trunk/gc.c#L4506
 static void
 unlock_page_body(rb_objspace_t *objspace, struct heap_page_body *body)
 {
-    /* If this is an explicit compaction (GC.compact), we don't need a read
-     * barrier, so just return early. */
-    if (objspace->flags.during_compacting >> 1) {
-        return;
-    }
 #if defined(_WIN32)
     DWORD old_protect;
 
-- 
cgit v0.10.2


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

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