Actions
Bug #22415
openThread.handle_interrupt needs to preserve errinfo
Bug #22415:
Thread.handle_interrupt needs to preserve errinfo
Description
Thread.handle_interrupt checks for interrupts after its block has returned but before re-raising the break/return that left the block. A signal trap that runs in that window clears ec->errinfo, which is where the throw data for the pending break/return lives, so the VM throws nil.
This small script reproduces the SEGV very quickly:
Updated by rwstauner (Randy Stauner) 1 day ago
bugfix PR: https://github.com/ruby/ruby/pull/19260
Updated by rwstauner (Randy Stauner) 1 day ago
This is similar to https://bugs.ruby-lang.org/issues/22240 except that the same fix can be applied inside Ruby itself (instead of the fault being from native extensions).
Updated by rwstauner (Randy Stauner) 1 day ago
4.0 backport PR: https://github.com/ruby/ruby/pull/19261
Updated by rwstauner (Randy Stauner) 1 day ago
3.4 Backport PR: https://github.com/ruby/ruby/pull/19262
Updated by rwstauner (Randy Stauner) 1 day ago
3.3 backport PR: https://github.com/ruby/ruby/pull/19264
Actions