Project

General

Profile

Actions

Bug #18031

closed

Nested TracePoint#enable with define_method target crashes

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

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

Description

Found this crash while looking at tracing related code.
Haven't had time to dig deeper, so I'm making a ticket for now.

one = TracePoint.new(:call) {}
two = TracePoint.new(:call) {}

obj = Object.new
obj.define_singleton_method(:foo) {} # a bmethod

foo = obj.method(:foo)
one.enable(target: foo) do
  two.enable(target: foo) {}
end

It crashes on 2.6.5 and master (a7c85cc).

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0