JDK 24 |
---|
24Unresolved |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
JVMS 4.8 attempts to describe the validation that occurs on class file contents during class loading (under the umbrella of "format checking"), but its list of checks is incomplete. A better approach is to identify *throughout* Chapter 4 the assertions about the class file format that constitute format checks. My suggested approach is to carefully use the word "must" in Chapter 4 iff a format check is being described. Based on some testing of Hotspot behavior and desire to keep things simple, some suggested behavioral changes: - Eliminating checks on CONSTANT_NameAndType structures involving restricted method names (names that include < or >) and name/descriptor coordination (4.4.6). These checks should only occur when the constant is referenced from a context that requires a method. - Ensuring that a CONSTANT_InvokeDynamic structure never uses method name <init> (4.4.10), rather than delaying the check until an invokedynamic instruction is verified. - Rejecting class or interface declarations with Module, ModulePackages, or ModuleMainClass attributes (4.7.25, 4.7.26, 4.7.27), and non-static field declarations with ConstantValue attributes (4.7.2).
|