Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix post mortem location after exception inside load #562

Merged
merged 1 commit into from
May 30, 2019

Conversation

deivid-rodriguez
Copy link
Owner

After ruby/ruby@1998039, our post mortem debugging partially broke, because ruby started emitting two :raise events when an exception would happen during a load call. In this situation, the second :raise event would overwrite the first one, and the context location would be incorrect, leaving the user in an unexpected location.

We fix the issue by watching for the case where we have already saved the context to the raised exception, and avoiding the overwrite.

Fixes #165.

@deivid-rodriguez
Copy link
Owner Author

Build against ruby-head seems broken, but it seems unrelated to this PR. I'll investigate it.

@deivid-rodriguez
Copy link
Owner Author

ruby-head build was fixed in #563.

@deivid-rodriguez
Copy link
Owner Author

Posted a ticket and potential fix to ruby-core: https://bugs.ruby-lang.org/issues/15885

@deivid-rodriguez
Copy link
Owner Author

Even if this is fixed in core, we'll want to workaround this until the fix is included in all supported rubies, so merging.

@deivid-rodriguez deivid-rodriguez merged commit 4a29481 into master May 30, 2019
@deivid-rodriguez deivid-rodriguez deleted the fix_post_mortem_location branch May 30, 2019 23:05
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 20, 2020
Update ruby-byebug to 11.1.0.


## [11.1.0] - 2020-01-20

### Added

* Official support for MRI 2.7 ([@yui-knk]).

### Fixed

* [#562](deivid-rodriguez/byebug#562): post mortem mode landing in the wrong line when coming from an exception inside a `Kernel.load` call.

### Removed

* Support for MRI 2.3. Byebug no longer installs on this platform.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 27, 2020
Update ruby-byebug to 11.1.0.


## [11.1.0] - 2020-01-20

### Added

* Official support for MRI 2.7 ([@yui-knk]).

### Fixed

* [#562](deivid-rodriguez/byebug#562): post mortem mode landing in the wrong line when coming from an exception inside a `Kernel.load` call.

### Removed

* Support for MRI 2.3. Byebug no longer installs on this platform.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post Mortem support broken in rubies >= 2.2.4
1 participant