mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 00:46:26 +08:00
Since the FREEOBJ internal event fires only for the main objspace (a non-main Ractor's lock-free sweep must not run arbitrary C callbacks), an object that dies in another Ractor leaves its allocation-tracing entry behind, still marked living. When the allocator reuses that address, newobj_i tripped its debug assertion; release builds already recycle the entry. Drop the stale assertion. This was latent but rare while a dead Ractor's pages waited for the inheritor's next major GC; the previous commits return those pages to the pool at death, which made it deterministic (TestObjSpaceRactor#test_tracing_does_not_crash on assert builds). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>