summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2020-05-06 15:52:37 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2020-05-07 08:44:11 -0700
commit00698f26a9141d6226635d3c53761ef03dd8ed6b (patch)
treeb2f6af4ce1a022117381540b89ca1ccd9535b076
parent1084b679bd793b98ee75cb8b2bbbc664998f041f (diff)
`T_MOVED` should never be pushed on the mark stack
No objects should ever reference a `T_MOVED` slot. If they do, it's absolutely a bug. If we kill the process when `T_MOVED` is pushed on the mark stack it will make it easier to identify which object holds a reference that hasn't been updated.
-rw-r--r--gc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index a3f2de74aa..67ec968bd9 100644
--- a/gc.c
+++ b/gc.c
@@ -4590,6 +4590,7 @@ push_mark_stack(mark_stack_t *stack, VALUE data)
switch (BUILTIN_TYPE(obj)) {
case T_NIL:
case T_FIXNUM:
+ case T_MOVED:
rb_bug("push_mark_stack() called for broken object");
break;