RFR 8224952: RI deviates from JVMS - non-zero minor_version for class files throws UnsupportedClassVersionError.

Harold Seigel harold.seigel at oracle.com
Tue Jun 4 14:50:10 UTC 2019


Hi,

Please review this fix to change the JVM's handling of class file 
versions to match what is in the JVM Spec 
<https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-4.html#jvms-4.1>.  
With this change, the following class file major and minor version 
combinations are allowed:

  * 45 <= major_version < 56, and any minor version
  * 56 <= major_version < latest major version and minor version of 0 or
    65535
  * Major_version = latest major_version and minor_version = 0
  * Major_version = latest_major_version and minor_version = 65535 and
    option --enable-preview is specified

Note that 56 is the class file version for JDK-12.

Open Webrev: 
http://cr.openjdk.java.net/~hseigel/bug_8224952/webrev/index.html

JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8224952

This change causes the following ten JCK tests to fail.  These tests 
will need to be excluded.  See JCK-7312230 
<https://bugs.openjdk.java.net/browse/JCK-7312230>.

    vm/classfmt/clf/clfver001/clfver00101m028/clfver00101m028.html
    vm/classfmt/clf/clfver001/clfver00101m030/clfver00101m030.html
    vm/classfmt/clf/clfver001/clfver00101m029/clfver00101m029.html
    vm/classfmt/clf/clfver001/clfver00101m021/clfver00101m021.html
    vm/classfmt/clf/clfver001/clfver00101m023/clfver00101m023.html
    vm/classfmt/clf/clfver001/clfver00101m026/clfver00101m026.html
    vm/classfmt/clf/clfver001/clfver00101m025/clfver00101m025.html
    vm/classfmt/clf/clfver001/clfver00101m022/clfver00101m022.html
    vm/classfmt/clf/clfver001/clfver00101m024/clfver00101m024.html
    vm/classfmt/clf/clfver001/clfver00101m027/clfver00101m027.html

The fix was regression tested by running Mach5 tiers 1 and 2 tests and 
builds on Linux-x64, Solaris, Windows, and Mac OS X, by running Mach5 
tiers 3-7 tests on Linux-x64, and JCK lang and VM tests on Linux-x64.

Thanks, Harold



More information about the hotspot-runtime-dev mailing list