Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing write barrier to env_copy()
Previously, the following crashed with `vm_assert_env:imemo_type_p(obj, imemo_env)` due to missing a missing WB: o = Object.new def o.foo(n) freeze GC.stress = 1 # inflate block nesting get an imemo_env for each level n.tap do |i| i.tap do |local| return Ractor.make_shareable(-> do local + i + n end) end end ensure GC.stress = false GC.verify_internal_consistency end p o.foo(1)[] By the time the recursive env_copy() call returns, `copied_env` could have aged or have turned greyed, so we need a WB for the `ep[VM_ENV_DATA_INDEX_SPECVAL]` assignment which adds an edge. Fix: 674eb7d
- Loading branch information