[#111712] [Ruby master Feature#19322] Support spawning "private" child processes — "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" <ruby-core@...>
SXNzdWUgIzE5MzIyIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGtqdHNhbmFrdHNpZGlzIChLSiBUc2Fu
14 messages
2023/01/07
[ruby-core:112057] [Ruby master Bug#19382] Infinite loop in tracepoints where called method comes from evaled code
From:
"luke-gru (Luke Gruber) via ruby-core" <ruby-core@...>
Date:
2023-01-26 17:27:05 UTC
List:
ruby-core #112057
Issue #19382 has been reported by luke-gru (Luke Gruber).
----------------------------------------
Bug #19382: Infinite loop in tracepoints where called method comes from evaled code
https://bugs.ruby-lang.org/issues/19382
* Author: luke-gru (Luke Gruber)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
events = []
meth_name = "mymethod"
code = <<~RUBY
def #{meth_name}(); true; end
RUBY
eval(code, binding, 'my_location')
tracepoint = TracePoint.new(:line) { |tp|
events << tp.path # infinite loop here
}.tap(&:enable)
send("#{meth_name}")
pp events
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/