Actions
Bug #22380
closedRuby::Box: a GC while copying a class into a box crashes
Bug #22380:
Ruby::Box: a GC while copying a class into a box crashes
ruby -v:
ruby 4.0.7 (2026-09-22 revision 9aea6bb2f1) +YJIT +MN +PRISM [arm64-darwin27]
Description
This is a backport request for the following crash:
$ RUBY_BOX=1 ruby --disable-gems -W:no-experimental -e 'GC.stress = true; module Enumerable; def m; end; end'
-e:1: [BUG] try to mark T_NONE object (obj: 0x00000001042efe28 T_NONE/, parent: 0x000000010416dc08 T_MODULE/Module Enumerable)
Fixed on master by 44fff96b0bc and 18b6bfdb67e (https://github.com/ruby/ruby/pull/18842). Ruby 4.0.7 still crashes.
Actions