JDK-8349624 : Validation for slot missing in CodeBuilder local variable instructions
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.classfile
  • Affected Version: 24,25
  • Priority: P3
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2025-02-07
  • Updated: 2025-02-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25Unresolved
Related Reports
Relates :  
Relates :  
Description
A method like CodeBuilder::loadLocal(TypeKind tk, int slot) does not verify if the slot is within a valid range. Consequently, it allows an invalid slot (such as -1) to pass through without rejection, resulting in the successful creation of the code model despite the error.
Comments
This is not a tck-red issue. The reason is, the JCK24 suite has no test yet for this assertion (and that is why the test url is not mentioned in this ticket also). The tests are under development under JCK 25 and I found this validation-failure while I was merely playing with the api.
09-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23522 Date: 2025-02-07 19:40:44 +0000
07-02-2025