Project

General

Profile

Actions

Bug #18060

closed

Infinite loop when b_return TracePoint raises

Added by alanwu (Alan Wu) over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:104767]

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.

Fix: https://github.com/ruby/ruby/pull/4638

Actions

Also available in: Atom PDF

Like0
Like0Like0