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

Harold Seigel harold.seigel at oracle.com
Fri Jun 7 14:13:48 UTC 2019


Thanks Coleen.

I'll fix the ResourceMark issue before pushing the change.

Harold

On 6/7/2019 10:05 AM, coleen.phillimore at oracle.com wrote:
>
> http://cr.openjdk.java.net/~hseigel/bug_8224952.2/webrev/src/hotspot/share/classfile/classFileParser.cpp.frames.html 
>
>
> 4810 } else { // minor != JAVA_PREVIEW_MINOR_VERSION
>
>
> I think you need a ResourceMark here.
>
> Since you have a THREAD argument, ResourceMark is cheap, so I suggest 
> putting just one at the beginning of the function so you don't have to 
> worry about missing ones. I don't need another webrev for that.
>
> Otherwise this looks good.
>
> Thanks,
> Coleen
>
> On 6/6/19 9:02 AM, Harold Seigel wrote:
>> Hi,
>>
>> Please review this second attempt to fix the JVM's handling of class 
>> file versions to match what is in the latest JVM Spec 
>> <https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-4.html#jvms-4.1>. 
>> With this change, only 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
>>  * 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.
>>
>> The change also contains a small fix for -Xlog:class+preview. This 
>> fix was tested by hand.
>>
>> Open Webrev: 
>> http://cr.openjdk.java.net/~hseigel/bug_8224952.2/webrev/index.html
>>
>> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8224952
>>
>> 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-5 tests on Linux-x64, and JCK lang and VM tests on 
>> Linux-x64.
>>
>> Thanks, Harold
>>
>


More information about the hotspot-runtime-dev mailing list