-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
low
-
Preexisting users usually can discover these issues when they encounter inconsistencies in produced class files. These permissive behavior is believed not to be depend on as Class-File API is still new.
-
Java API
-
SE
Summary
Validate the local variable slot argument, multinewarray dimensions argument, and iinc value arguments and specify such validation.
Problem
Currently, local variable slot, multinewarray dimensions, and iinc value are all modeled by plain int
values. They are not range-checked upon passing into factory methods. Therefore, the created model objects can have illegal values not representable in the class
file format, or not allowed by the JVMS.
Solution
Perform range checks on these 3 selected type of arguments and specify that range checks are performed. This is better than allowing such values to be lost in the writing of class
files, or to be passed to downstream class file transformations.
Specification
See the attached diff.
- csr of
-
JDK-8341277 Validate slot argument for instruction factories
-
- Resolved
-