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

Backtrace set with set_backtrace is not dup'd properly in 9.2.7.0 #5738

Closed
mvz opened this issue May 19, 2019 · 2 comments
Closed

Backtrace set with set_backtrace is not dup'd properly in 9.2.7.0 #5738

mvz opened this issue May 19, 2019 · 2 comments
Milestone

Comments

@mvz
Copy link

mvz commented May 19, 2019

Environment

  • jruby -v: jruby 9.2.7.0 (2.5.3) 2019-04-09 8a269e3 OpenJDK 64-Bit Server VM 11.0.4+2-Debian-1 on 11.0.4+2-Debian-1 [linux-x86_64]
  • JRUBY_OPTS: --dev
  • Operating system and platform (e.g. uname -a): Linux bean 4.19.0-5-amd64 #1 SMP Debian 4.19.37-3 (2019-05-15) x86_64 GNU/Linux

Expected Behavior

Given the following ruby code:

begin
  raise
rescue => err
  err.set_backtrace ['hi']
  p err.backtrace
  p err.dup.backtrace
end

In MRI and JRuby 9.2.6.0, this prints:

["hi"]
["hi"]

Actual Behavior

In JRuby 9.2.7.0, this prints:

["hi"]
["foo.rb:2:in `<main>'"]
@headius
Copy link
Member

headius commented May 20, 2019

Nice find! Maybe I don't want to know how you found it...

@headius headius added this to the JRuby 9.2.8.0 milestone May 20, 2019
@mvz
Copy link
Author

mvz commented May 20, 2019

Thanks, @headius!

mvz added a commit to cucumber/aruba that referenced this issue Jun 12, 2019
There's an issue with dup-ing an exception after its backtrace has been
set manually in JRuby 9.2.7.0. It should be resolved in 9.2.8.0 once that's
released.

See jruby/jruby#5738 for more details.
mvz added a commit to cucumber/aruba that referenced this issue Jun 15, 2019
There's an issue with dup-ing an exception after its backtrace has been
set manually in JRuby 9.2.7.0. It should be resolved in 9.2.8.0 once that's
released.

See jruby/jruby#5738 for more details.
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

No branches or pull requests

2 participants