summaryrefslogtreecommitdiff
path: root/bootstraptest/test_autoload.rb
diff options
context:
space:
mode:
authorAaron Patterson <[email protected]>2022-01-28 10:06:02 -0800
committerAaron Patterson <[email protected]>2022-02-04 14:36:04 -0800
commit2a76440fac62bb0f6e53ccada07caf4b47b78cf9 (patch)
tree08c974a7bc2ce78e44175cf3d4cfd4a810b6b856 /bootstraptest/test_autoload.rb
parent06e96b922fbce3f210dcc9e35d7468fe94a1af78 (diff)
[Bug #18501] Fire write barrier after hash has been written
Before this change the write barrier was executed before the key and value were actually reachable via the Hash. This could cause inconsistencies in object coloration which would lead to accidental collection of dup'd keys. Example: 1. Object O is grey, Object P is white. 2. Write barrier fires O -> P 3. Write barrier does nothing 4. Malloc happens, which starts GC 5. GC colors O black 6. P is written in to O (now we have O -> P reference) 7. P is now accidentally treated as garbage
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5525
Diffstat (limited to 'bootstraptest/test_autoload.rb')
0 files changed, 0 insertions, 0 deletions