diff options
author | Peter Zhu <[email protected]> | 2024-08-14 11:31:17 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-08-14 13:49:52 -0400 |
commit | 0610f1b083738bb0a84cede42fda048fa116404e (patch) | |
tree | a6ccd4d3747a09cc17fd81bfc3649a6894aa832f /lib/irb/pager.rb | |
parent | 85f99b382857af1e3c14e0edfdb4eb0ab6774996 (diff) |
Fix crash when GC runs during finalizers at shutdown
We need to remove from the finalizer_table after running all the
finalizers because GC could trigger during the finalizer which could
reclaim the finalizer table array.
The following code crashes:
1_000_000.times do
o = Object.new
ObjectSpace.define_finalizer(o, proc { })
end
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11375
Diffstat (limited to 'lib/irb/pager.rb')
0 files changed, 0 insertions, 0 deletions