JEP draft: Better-defined JVM class file validation

Harold Seigel harold.seigel at oracle.com
Wed Jun 9 14:30:04 UTC 2021


The JVM does use the values of the InnerClasses attribute.  It uses the 
values to compile a set of class modifier flags and stores the set in 
the class mirror.  The set of flags is also used by JVM TI.

So, rather than having, for example, JVM TI parse the contents of the 
InnerClasses attrbute, the JVM would still parse the attribute at class 
load time, but just ignore the attribute if it was invalid?

Thanks, Harold

On 6/8/2021 5:10 PM, Dan Smith wrote:
>> Actually, the fact that the InnerClasses attribute is validated by the VM is confusing because it implies that the VM uses the values of that attributes to check access which it does not.
>> For me, the spec says that those attributes are optionals so Hotspot should behave as the spec says.
> The spec says some things that are unclear about how/whether InnerClass attributes should be validated, but yes, agree that there will be less ambiguity if we're totally hands-off.
>


More information about the valhalla-spec-observers mailing list