Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The nightly build (jdk-9+181-20 on January 22 2018) has different behaviors from OpenJDK #999
C0.class (via Google Drive) triggers different behaviors on OpenJDK and OpenJ9.
The nightly build (jdk-9+181-20 on January 22 2018) throws an exception in default mode,
This bug may relate to #997. I am not sure whether this is a bug of OpenJDK or OpenJ9.
Oracle JDK 9.0.4
The bytecodes causing the issue (truncated for clarity)
Which would approximately correspond to the following java code
However I suspect that if you fed this to javac it would add an implicit
The issue here is that internally the JVM only operates on int types, and will sign extend or truncate as needed on loads and stores. My suspicion is that Oracle is implicitly truncating to a
Looking at the Java 9 JVMS for
We can do this by either:
I have a solution which does fix the test case (https://github.com/dnakamura/openj9/tree/ret_opcode). Although I'm not sure its the right solution, and of course it needs to add jit support