ruby-changes:61046
From: Aaron <ko1@a...>
Date: Fri, 8 May 2020 00:44:32 +0900 (JST)
Subject: [ruby-changes:61046] 00698f26a9 (master): `T_MOVED` should never be pushed on the mark stack
https://git.ruby-lang.org/ruby.git/commit/?id=00698f26a9 From 00698f26a9141d6226635d3c53761ef03dd8ed6b Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Wed, 6 May 2020 15:52:37 -0700 Subject: `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. diff --git a/gc.c b/gc.c index a3f2de7..67ec968 100644 --- a/gc.c +++ b/gc.c @@ -4590,6 +4590,7 @@ push_mark_stack(mark_stack_t *stack, VALUE data) https://github.com/ruby/ruby/blob/trunk/gc.c#L4590 switch (BUILTIN_TYPE(obj)) { case T_NIL: case T_FIXNUM: + case T_MOVED: rb_bug("push_mark_stack() called for broken object"); break; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/