Crash in JIT compiler with server VM

Christian Thalinger Christian.Thalinger at Sun.COM
Fri May 21 02:42:32 PDT 2010


On Fri, 2010-05-21 at 11:25 +0200, Christian Thalinger wrote:
> On Fri, 2010-05-21 at 10:16 +0200, Rémi Forax wrote:
> > Hi John & Christian,
> > the JIT compiler of C2 seems to have a problem with this code (see 
> > VMCrash.java).
> > I use jdk7b92.
> > 
> > Step to reproduce:
> > compile VMChrash and RT.java
> > run with: java -server -XX:+UnlockExperimentalVMOptions 
> > -XX:+EnableInvokeDynamic VMCrash
> 
> This is all getting very complicated.  Indeed it crashes with older
> builds.  I just wanted to try a recent hotspot-comp build but the test
> does not work because of the recent CallSite constructor changes.

I built a HotSpot based on 2338d41fbd81 (the changeset before John's
changes) and ran with the brand new JDK7 b94:

$ gamma -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic VMCrash
VM option '+UnlockExperimentalVMOptions'
VM option '+EnableInvokeDynamic'
Exception in thread "main" java.dyn.InvokeDynamicBootstrapError: exception thrown while linking
	at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:85)
	at VMCrash.f(VMCrash.java:8)
	at VMCrash.main(VMCrash.java:16)
Caused by: java.lang.IllegalArgumentException: bad adapter (conversion=0x00000100): type mismatch: returning a int, but caller expects boolean
	at sun.dyn.MethodHandleNatives.init(Native Method)
	at sun.dyn.AdapterMethodHandle.<init>(AdapterMethodHandle.java:53)
	at sun.dyn.AdapterMethodHandle.<init>(AdapterMethodHandle.java:58)
	at sun.dyn.AdapterMethodHandle.makeRetype(AdapterMethodHandle.java:478)
	at sun.dyn.AdapterMethodHandle.makeRetypeRaw(AdapterMethodHandle.java:468)
	at sun.dyn.ToGeneric.<init>(ToGeneric.java:148)
	at sun.dyn.ToGeneric.of(ToGeneric.java:257)
	at sun.dyn.ToGeneric.make(ToGeneric.java:249)
	at sun.dyn.MethodHandleImpl.convertArguments(MethodHandleImpl.java:671)
	at java.dyn.MethodHandles.convertArguments(MethodHandles.java:811)
	at RT.bootstrap(RT.java:451)
	at sun.dyn.CallSiteImpl.makeSite(CallSiteImpl.java:83)
	... 2 more

-- Christian



More information about the mlvm-dev mailing list