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
When JRuby is reading all envs, passing UTF-8 string to setenv crashes with IllegalArgumentException.
java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:236)
! at jnr.ffi.provider.converters.CharSequenceParameterConverter.toNative(CharSequenceParameterConverter.java:125)
at jnr.posix.LinuxLibC$jnr$ffi$0.setenv(Unknown Source)
at jnr.posix.BaseNativePOSIX.setenv(BaseNativePOSIX.java:303)
at jnr.posix.CheckedPOSIX.setenv(CheckedPOSIX.java:301)
at jnr.posix.LazyPOSIX.setenv(LazyPOSIX.java:303)
! at org.jruby.RubyGlobal$StringOnlyRubyHash.case_aware_op_aset(RubyGlobal.java:424)
at org.jruby.RubyGlobal$CaseInsensitiveStringOnlyRubyHash.op_aset(RubyGlobal.java:335)
at org.jruby.RubyGlobal$StringOnlyRubyHash.op_aset19(RubyGlobal.java:387)
at org.jruby.RubyHash$28.visit(RubyHash.java:1793)
at org.jruby.RubyHash.visitAll(RubyHash.java:636)
at org.jruby.RubyHash.replaceCommon19(RubyHash.java:1837)
at org.jruby.RubyHash.replace19(RubyHash.java:1791)
at org.jruby.RubyHash$INVOKER$i$1$0$replace19.call(RubyHash$INVOKER$i$1$0$replace19.gen)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
The text was updated successfully, but these errors were encountered:
The other detail to this report is that the default Java charset was not UTF-8. So the Converter was trying to set the position too large since the string ended up having more bytes than expected.
When JRuby is reading all envs, passing UTF-8 string to setenv crashes with IllegalArgumentException.
The text was updated successfully, but these errors were encountered: