summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2023-12-06 20:35:40 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2023-12-07 11:16:12 -0500
commit050806f4252dce2698260d905f7c86c621c1ec63 (patch)
treee9656c2e826a730c58ba134468c4a02894a45012 /test/ruby
parent5809b75019dd3a253bb0e45c37bbf0cca0400911 (diff)
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: 674eb7df7f409099f33da77293d9658e09b470d6
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions