mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
A Ractor's zombies with finalizers are poisoned and moved to the main
objspace when the Ractor terminates. If the process exits before they
are finalized, rb_gc_impl_shutdown_call_finalizer_i touches them and
ASAN reports use-after-poison.
```
8.times.map do
Ractor.new do
10.times do
4.times { ObjectSpace.define_finalizer(Object.new, proc { sleep 0.0005 }) }
GC.start
sleep 0.0001
end
end
end.each(&:join)
#=> ERROR: AddressSanitizer: use-after-poison (sometimes)
```
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>