summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-20 05:11:37 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-20 05:11:37 +0000
commit109633b12730484ea23bac5203a8ed6d6d820477 (patch)
tree1c2764d0ed23714dbc8d4395fffa70baa4233c70 /gc.c
parentb25bf66a8cd34e10f436535c8b9371bca8978a2c (diff)
Always pin stack zombie and moved slots
We should always pin stack zombies and moved git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 1adfa8c088..be61b3dad1 100644
--- a/gc.c
+++ b/gc.c
@@ -4654,6 +4654,11 @@ gc_mark_maybe_(rb_objspace_t *objspace, VALUE obj, int pin)
unpoison_object(obj, false);
type = BUILTIN_TYPE(obj);
+
+ if (type == T_MOVED || type == T_ZOMBIE) {
+ gc_pin(objspace, obj);
+ }
+
/* Garbage can live on the stack, so do not mark or pin */
if (type != T_MOVED && type != T_ZOMBIE && type != T_NONE) {
if (pin) {