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

jit.codeCache throws StringIndexOutOfBoundsException #1584

Closed
areman opened this issue Mar 26, 2014 · 2 comments
Closed

jit.codeCache throws StringIndexOutOfBoundsException #1584

areman opened this issue Mar 26, 2014 · 2 comments
Milestone

Comments

@areman
Copy link
Contributor

areman commented Mar 26, 2014

I'm using
jruby 1.7.11 (1.9.3p392) 2014-02-24 86339bb on Java HotSpot(TM) Client VM 1.7.0_10-b18 [Windows XP-x86]

I try to run
jruby -Xcompile.mode=JIT -Xjit.debug=true -Xjit.codeCache=c:\tmp test.rb
and an excpetion will be thrown

2014-03-26T21:51:33.000+01:00: JITCompiler: writing jitted code to to c:\tmp\rubyjit\FILE_4F37991FE5C3D20BF1325EE061298740151BB2D6.class
null:-1:in `substring': java.lang.StringIndexOutOfBoundsException: String index out of range: -9
        from BacktraceData.java:89:in `transformBacktrace'
        from BacktraceData.java:40:in `getBacktrace'
        from RubyException.java:218:in `getBacktraceElements'
        from RaiseException.java:225:in `preRaise'
        from RaiseException.java:194:in `preRaise'
        from RaiseException.java:110:in `<init>'
        from Ruby.java:3790:in `newRaiseException'
        from Ruby.java:3667:in `newLoadError'
        from LoadService.java:981:in `newLoadErrorFromThrowable'
        from LoadService.java:972:in `tryLoadingLibraryOrScript'
        from LoadService.java:573:in `smartLoadInternal'
        from LoadService.java:457:in `requireCommon'
        from LoadService.java:421:in `require'
        from RubyKernel.java:1091:in `requireCommon'
        from RubyKernel.java:1085:in `require19'
        from RubyKernel$INVOKER$s$1$0$require19.gen:-1:in `call'
        from JavaMethod.java:350:in `call'
        from CachingCallSite.java:326:in `cacheAndCall'
        from CachingCallSite.java:170:in `call'
        from file:/C:/ruby/jruby-1.7.11/lib/jruby.jar!/jruby/kernel19/rubygems.rb:4:in `chained_0_rescue_1$RUBY$SYNTHETIC__file__'
        from file:/C:/ruby/jruby-1.7.11/lib/jruby.jar!/jruby/kernel19/rubygems.rb:3:in `__file__'
        from file:/C:/ruby/jruby-1.7.11/lib/jruby.jar!/jruby/kernel19/rubygems.rb:-1:in `load'
        from Ruby.java:811:in `runScript'
        from Ruby.java:2833:in `compileAndLoadFile'
        from ExternalScript.java:54:in `load'
        from LoadService.java:359:in `load'

I think the reason is, my cached jit classes doesn't contain a JITCompiler.CLASS_METHOD_DELIMITER as expected by the BacktraceData.

@MSNexploder
Copy link
Contributor

I guess this one can be closed.
"jit.codeCache" is deprecated in 9k and (as far as I can see) does nothing nowadays.

@kares kares added this to the Won't Fix milestone Jun 10, 2017
@kares
Copy link
Member

kares commented Jun 10, 2017

@MSNexploder thanks, let's close this stale piece ... some discussion might happen at #1585

@kares kares closed this as completed Jun 10, 2017
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

3 participants