summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-01 02:50:35 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-01 02:50:35 +0000
commit0b16758b049d10715e3861ae208c65fcf290013e (patch)
tree56fdfeee1fcf85ffb491e7df56c1360d3be2c2e9 /hash.c
parentbd68968d80ba3b9f51627b480848097e20330e52 (diff)
fix WB miss.
* hash.c (linear_copy): remember a hash object to mark pointing objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 952a3e7..7bf5e11 100644
--- a/hash.c
+++ b/hash.c
@@ -1003,12 +1003,16 @@ linear_copy(VALUE hash1, VALUE hash2)
RHASH_ARRAY_BOUND_SET(hash1, RHASH_ARRAY_BOUND(hash2));
RHASH_ARRAY_SIZE_SET(hash1, RHASH_ARRAY_SIZE(hash2));
RHASH_ARRAY_SET(hash1, new_tab);
+
+ rb_gc_writebarrier_remember(hash1);
return new_tab;
}
else {
RHASH_ARRAY_BOUND_SET(hash1, RHASH_ARRAY_BOUND(hash2));
RHASH_ARRAY_SIZE_SET(hash1, RHASH_ARRAY_SIZE(hash2));
RHASH_ARRAY_SET(hash1, old_tab);
+
+ rb_gc_writebarrier_remember(hash1);
return old_tab;
}
}