still no fun with invokedynamic

Rémi Forax forax at univ-mlv.fr
Wed Sep 9 12:16:34 PDT 2009


Le 09/09/2009 20:55, Jochen Theodorou a écrit :
> Jochen Theodorou schrieb:
>    
>> Rémi Forax schrieb:
>>      
>>> Le 09/09/2009 20:42, Jochen Theodorou a écrit :
>>>        
>>>> hi all,
>>>>
>>>> I am in urgend need of an actual VM with MethodHandles, but this is as
>>>> always quuite complicated. This time I created a chroot envrionment for
>>>> 32 bit, that was where I last time had to stop. I managed to get it
>>>> compiled by the patch that was provided here 5 months ago and finally
>>>> had a VM to run. So I did:
>>>>
>>>> davinci/sources/jdk/build/linux-i586/bin/java
>>>> -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles
>>>> -XX:+EnableInvokeDynamic FidgetDemo
>>>>
>>>> and got:
>>>>
>>>>          
>>>>> #
>>>>> # A fatal error has been detected by the Java Runtime Environment:
>>>>> #
>>>>> #  Internal Error (methodHandles.cpp:98), pid=8548, tid=4149795728
>>>>> #  Error: guarantee(z&&   EnableMethodHandles,"can only enable once, and only if -XX:+EnableMethodHandles")
>>>>> #
>>>>> # JRE version: 7.0
>>>>> # Java VM: OpenJDK Client VM (16.0-b08 mixed mode linux-x86 )
>>>>> # An error report file with more information is saved as:
>>>>> # /tmp/t/hs_err_pid8548.log
>>>>> #
>>>>> # If you would like to submit a bug report, please visit:
>>>>> #   http://java.sun.com/webapps/bugreport/crash.jsp
>>>>> # The crash happened outside the Java Virtual Machine in native code.
>>>>> # See problematic frame for where to report the bug.
>>>>> #
>>>>> Aborted
>>>>>
>>>>>            
>>>> No idea why this fails like this. What I now need is either a workaround
>>>> for this problem here, or a running JVM with method handles that I can
>>>> download somewhere. As long as it is linux it should be fine, whatever
>>>> it is.
>>>>
>>>> Who can help me here?
>>>>
>>>>          
>>> Hi jochen,
>>> just try to remove -XX:+EnableMethodHandles.
>>>
>>> This line works for me:
>>>
>>> davinci/sources/jdk/build/linux-i586/bin/java
>>> -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic FidgetDemo
>>>        
>>
>> java  -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles  FidgetDemo
>> OpenJDK Server VM warning: JSR 292 invokedynamic is disabled in this
>> JVM.  Use -XX:+EnableInvokeDynamic to enable.
>> Fidgety self-modifying call site...
>> --- loop #0
>> Exception in thread "main" java.lang.IncompatibleClassChangeError
>> 	at FidgetDemo.main(FidgetDemo.java:13)
>>
>> doesn't look good
>>      
> wrong one... still:
>
> java -XX:+UnlockExperimentalVMOptions   FidgetDemoOpenJDK Server VM
> warning: JSR 292 method handles are disabled in this JVM.  Use
> -XX:+EnableMethodHandles to enable.
>    

and

java  -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic FidgetDemo

Rémi




More information about the mlvm-dev mailing list