[ruby-core:93977] [Ruby master Bug#15885] Duplicated `:raise` tracepoint event when exception inside `load` call happens

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-80170.20190729073902.d2c1115df0ffdfda@ruby-lang.org>
Issue #15885 has been updated by ko1 (Koichi Sasada).

Assignee set to ko1 (Koichi Sasada)
Status changed from Open to Assigned

----------------------------------------
Bug #15885: Duplicated `:raise` tracepoint event when exception inside `load` call happens
https://bugs.ruby-lang.org/issues/15885#change-80170

* Author: deivid (David Rodríguez)
* Status: Assigned
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Target version: 
* ruby -v: 
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi!

A long time ago, [this ruby-core change](https://github.com/ruby/ruby/commit/1998039ea4f867583d7e37ce200a88490707c330) broke a test in byebug related to post-mortem debugging. See https://github.com/deivid-rodriguez/byebug/issues/165.

The problem is that after the mentioned commit, the TracePoint API raises two `:trace` events when an exception happens during a `load` call. As a result, byebug ends up using the second `:raise` event, and that means post-mortem debugging leaves the user in an incorrect place.

I managed to workaround the issue inside byebug with https://github.com/deivid-rodriguez/byebug/pull/562, but I thought it would be worth mentioning here since it seems like incorrect behavior to me.

For what it's worth, reverting the referenced commit fixes the issue. I attach a patch doing that together with a test.

---Files--------------------------------
0001-Single-raise-tracepoint-event-when-exception-inside-.patch (4.44 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.