[jdk21u-dev] RFR: 8334870: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes
Severin Gehwolf
sgehwolf at openjdk.org
Mon Aug 4 14:15:55 UTC 2025
On Fri, 27 Jun 2025 01:16:59 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
> This change allows javac to tolerate `RuntimeVisibleParameterAnnotations` and `RuntimeInvisibleParameterAnnotations` that do not contain entries for all parameters, or that contain additional entries.
>
> Currently class reading crashes with an `ArrayIndexOutOfBoundsException` if the attributes contain fewer than the expected number of parameters, which leaves method symbols in an invalid state and causes the crash discussed in [JDK-8359336](https://bugs.openjdk.org/browse/JDK-8359336).
I tend to agree. Requiring for JDK 21 updates to opt-in while JDK 25 has it on by default seems a reasonable situation to be in for this.
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1930#issuecomment-3150896702
More information about the jdk-updates-dev
mailing list