You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to install OpenSSL 2.2.1 with any released version of TruffleRuby or with the current dev version. This will show up as an error about rb_str_locktmp not being implemented:
ERROR: While executing gem ... (RuntimeError)
External LLVMFunction rb_str_locktmp cannot be found. (com.oracle.truffle.llvm.runtime.except.LLVMLinkerException)
The relevant commit in the OpenSSL extension is ruby/openssl@d382749. The full set of changes is ruby/openssl@v2.2.0...v2.2.1. It looks like in addition to rb_str_locktmp we'll need to handle rb_str_unlocktmp and store the boolean flag that the pair of functions adjusts.
The text was updated successfully, but these errors were encountered:
The repro is actually a bit more complex, installing openssl 2.2.1 works fine, but then using it breaks:
$ gem i openssl:2.2.1
$ gem i json
ERROR: While executing gem ... (RuntimeError)
External LLVMFunction rb_str_locktmp cannot be found. (com.oracle.truffle.llvm.runtime.except.LLVMLinkerException)
Translated to internal error
openssl is a default gem so the latest version is always picked (unless running under bundler, but e.g. bundle install is not run under bundler)
@bjfish Could you look to support those 2 functions?
We should implement rb_str_locktmp, rb_str_unlocktmp and check that boolean flag (we can store it in RubyString) in methods which mutate the string.
We could have Primitive.check_mutable_string (instead of Primitive.check_frozen) and raiseIfNotMutable instead of raiseIfFrozenSelf for String methods & nodes.
I had a quick look at CRuby code for these functions, and it seems they prevent mutation even for the thread which "locked" the String, but we should verify that is indeed the behavior with C-API specs.
So if I got it right, it's basically the same as a temporary .freeze + unfreeze but with a different error message, and only for Strings.
It's not possible to install OpenSSL 2.2.1 with any released version of TruffleRuby or with the current dev version. This will show up as an error about
rb_str_locktmp
not being implemented:The relevant commit in the OpenSSL extension is ruby/openssl@d382749. The full set of changes is ruby/openssl@v2.2.0...v2.2.1. It looks like in addition to
rb_str_locktmp
we'll need to handlerb_str_unlocktmp
and store the boolean flag that the pair of functions adjusts.The text was updated successfully, but these errors were encountered: