Crash with invokeDynamic on MethodMissing attempt

Charles Oliver Nutter charles.nutter at sun.com
Mon May 18 16:29:13 PDT 2009


Here you go! The details of getting it to run under mlvm are up to you, 
but jruby accepts options like -J-XX:+EnableInvokeDynamic, etc.

git clone git://kenai.com/jruby~main jruby
cd jruby
git co -b invokedynamic origin/invokedynamic
ant clean jar (with MLVM as JAVA_HOME)
bin/jruby <important flags here> -e "code here"
   -or-
bin/jruby <important flags here> script.rb

Where important flags are:

--server (-server flag to JVM, if you want it)
-J-XX:+Enable{InvokeDynamic,MethodHandles}
-J-Djruby.compile.invokedynamic=true

Not a whole lot of logging/debugging in place at the moment, but if you 
also pass --bytecode to JRuby it will dump out the bytecode for the 
target script rather than run it. If it's wiring up right you'll see 
INVOKEDYNAMIC in there.

- Charlie

John Rose wrote:
> My first use of git was a couple days ago, to pull jruby from kenai.   
> So I'm a git noob.  (Too bad about ruby & mercurial.)
> 
> That said, can I have a recipe (script) for pulling, building your  
> hacked version of jruby, and then for running your test case(s)?   
> (From NetBeans, if possible, so I can dive into the JRuby code and  
> start debugging?)
> 
> Thanks; this is getting interesting!
> 
> -- John
> 
> On May 18, 2009, at 4:01 PM, Charles Oliver Nutter wrote:
> 
>> I'm also seeing crashes for several scenarios. Like this loop works:
>>
>> a = 1; while a < 1_000_000; a += 1; end
>>
>> But these two crash the JVM:
>>
>> a = 1.0; while a < 1_000_000.0; foo(a); a += 1.0; end
>> def foo(a); end; a = 1; while a < 1_000_000; foo(a); a += 1; end
>>
>> A simple fib bench also crashed. I've attached a dump from the "foo"  
>> case above, and I can provide a jruby dist to reproduce if you like.
>>
>> It tends to stymie further experimentation :) (no pressure, I know  
>> this stuff has just recently started to JIT).
> 
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev




More information about the mlvm-dev mailing list