Class validation cleanups

Harold Seigel harold.seigel at oracle.com
Wed Nov 13 21:22:21 UTC 2019


It looks like both verifiers will be affected.  For example, both 
verifiers parse method exception_tables and currently throw 
ClassFormatError.

On 11/13/2019 2:36 PM, Harold Seigel wrote:
> Hi Dan,
>
> Do you expect these spec modifications to require changes in both the 
> old and new verifiers?
>
> Thanks, Harold
>
> On 11/8/2019 4:04 PM, Dan Smith wrote:
>> I've put together some JVMS change proposals to improve its 
>> specification of the class validation process, including class 
>> loading, format checking, and verification.
>>
>> These are independent of Valhalla, but lay the groundwork for 
>> additional changes to the spec. They address things like:
>>
>> - How are <init> and <clinit> methods constrained?
>> - Can array types be field/method receiver types? (Yes, it turns out.)
>> - When do we enforce the 'final' modifier on classes/methods?
>> - Which attributes are validated, and when?
>> - How does class loading handle anomalous situations?
>>
>> For format checking refinements:
>> https://bugs.openjdk.java.net/browse/JDK-8233854
>> http://cr.openjdk.java.net/~dlsmith/class-validation/class-validation-20191107/specs/format-checking-jvms.html 
>>
>>
>> For class loading cleanup:
>> https://bugs.openjdk.java.net/browse/JDK-8233861
>> http://cr.openjdk.java.net/~dlsmith/class-validation/class-validation-20191107/specs/class-loading-jvms.html 
>>
>>
>> For attribute validation:
>> https://bugs.openjdk.java.net/browse/JDK-8233863
>> http://cr.openjdk.java.net/~dlsmith/class-validation/class-validation-20191107/specs/attribute-validation-jvms.html 
>>
>>
>> The last is the most disruptive, since we're proposing simply 
>> ignoring some attribute contents that has traditionally been parsed 
>> and validated. I think it may be reasonable to create a JEP for that 
>> piece.


More information about the valhalla-spec-observers mailing list