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
Sequel fails with -Xcompile.invokedynamic=true #4455
Comments
The exact code line in Sequel 4.42.1 See also line 183. |
You can force JIT to happen sooner with |
Thank you for the reproduction. I've managed to reproduce the error locally with various different errors. Setting
I'll start here. |
The problem was that invokedynamic was incorrectly binding instance variables in the cases where we allocate regular Java fields for them. The field variables of the object in my error above were at "logical" instance variable indices of 0, 1, and 2. The @opts variable accessed above was in the additional table of instance variables at index 1. When indy bound that variable, it used the table offset when calling methods that wanted the logical offset, so the object field at index 1 was accessed instead. It was empty in this case, resulting in a nil being passed to I also ran your example without the JIT threshold set, and with it set to a low non-zero value. All runs repeatedly passed, so I think we're good. |
@headius I can confirm that on jruby-9.1.8.0 the problem is no longer seen, where as mentioned error was seen on 9.1.7.0. |
Environment
macOS Sierra
Ubuntu Server 14.04 LTS (Trusty)
Gemfile:
test.rb:
Steps to reproduce:
foo
database accessible by your current user (createdb foo
) without any password (or edit the connection string intest.rb
to suit)bundle install
JRUBY_OPTS=<see below> bundle exec ruby test.rb
Expected Behavior
$ JRUBY_OPTS=-Xcompile.invokedynamic=true bundle exec ruby test.rb $
Actual Behavior
Notes
JRUBY_OPTS=
(i.e. blanked out)gem 'jdbc-sqlite3'
and a connection string ofjdbc:sqlite::memory:
The text was updated successfully, but these errors were encountered: