Actions
Bug #18060
closedInfinite loop when b_return TracePoint raises
Description
The following program loops indefinitely:
puts("PID: #{$$}")
class Foo
define_singleton_method(:foo) { return }
end
counter = 0
TracePoint.trace(:b_return) do |tp|
$stdout.write(counter, ' ', tp.inspect, "\r")
counter += 1
raise
end
Foo.foo
It doesn't seem intentional that this loops.
Updated by alanwu (Alan Wu) over 2 years ago
- Status changed from Open to Closed
Applied in changeset git|744d17ff6c33b09334508e8110007ea2a82252f5.
Fix infinite loop when b_return TracePoint throws
Previously, we didn't pop the frame that runs the TracePoint hook for
b_return events for blocks running as methods (bmethods). In case the
hook raises, that formed an infinite loop during stack unwinding in
hook_before_rewind().
[Bug #18060]
Actions
Like0
Like0Like0