When multiple threads try to create a call site, the following exception is thrown:
[2011-01-31T12:29:58.59] java.dyn.InvokeDynamicBootstrapError: call site initialization exception
[2011-01-31T12:29:58.59] at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:90)
[2011-01-31T12:29:58.59] at sun.dyn.MethodHandleNatives.makeDynamicCallSite(MethodHandleNatives.java:308)
...
[2011-01-31T12:29:58.59] at java.lang.Thread.run(Thread.java:732)
[2011-01-31T12:29:58.59] Caused by: java.dyn.WrongMethodTypeException: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; cannot be called as (Ljava/dyn/MethodHandle;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[2011-01-31T12:29:58.59] at java.dyn.MethodHandle.invokeWithArguments(MethodHandle.java:427)
[2011-01-31T12:29:58.59] at java.dyn.MethodHandle.invokeVarargs(MethodHandle.java:468)
[2011-01-31T12:29:58.59] at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:63)
[2011-01-31T12:29:58.59] ... 4 more
And also this exception:
[2011-01-31T12:29:58.88] java.lang.NullPointerException
[2011-01-31T12:29:58.88] at java.dyn.MethodType.parameterType(MethodType.java:463)
[2011-01-31T12:29:58.88] at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:46)
[2011-01-31T12:29:58.88] at sun.dyn.MethodHandleNatives.makeDynamicCallSite(MethodHandleNatives.java:308)
[2011-01-31T12:29:58.88] at vm.mlvm.indy.stress.java.loopsAndThreads.INDIFY_Test.runThread(INDIFY_Test.java:12062)
[2011-01-31T12:29:58.88] at vm.mlvm.share.MultiThreadedTest$1.run(MultiThreadedTest.java:32)
[2011-01-31T12:29:58.88] at java.lang.Thread.run(Thread.java:732)
Exception aren't thrown in the single-threaded mode.
[2011-01-31T12:29:58.59] java.dyn.InvokeDynamicBootstrapError: call site initialization exception
[2011-01-31T12:29:58.59] at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:90)
[2011-01-31T12:29:58.59] at sun.dyn.MethodHandleNatives.makeDynamicCallSite(MethodHandleNatives.java:308)
...
[2011-01-31T12:29:58.59] at java.lang.Thread.run(Thread.java:732)
[2011-01-31T12:29:58.59] Caused by: java.dyn.WrongMethodTypeException: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; cannot be called as (Ljava/dyn/MethodHandle;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[2011-01-31T12:29:58.59] at java.dyn.MethodHandle.invokeWithArguments(MethodHandle.java:427)
[2011-01-31T12:29:58.59] at java.dyn.MethodHandle.invokeVarargs(MethodHandle.java:468)
[2011-01-31T12:29:58.59] at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:63)
[2011-01-31T12:29:58.59] ... 4 more
And also this exception:
[2011-01-31T12:29:58.88] java.lang.NullPointerException
[2011-01-31T12:29:58.88] at java.dyn.MethodType.parameterType(MethodType.java:463)
[2011-01-31T12:29:58.88] at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:46)
[2011-01-31T12:29:58.88] at sun.dyn.MethodHandleNatives.makeDynamicCallSite(MethodHandleNatives.java:308)
[2011-01-31T12:29:58.88] at vm.mlvm.indy.stress.java.loopsAndThreads.INDIFY_Test.runThread(INDIFY_Test.java:12062)
[2011-01-31T12:29:58.88] at vm.mlvm.share.MultiThreadedTest$1.run(MultiThreadedTest.java:32)
[2011-01-31T12:29:58.88] at java.lang.Thread.run(Thread.java:732)
Exception aren't thrown in the single-threaded mode.