[jdk21u-dev] RFR: 8334870: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes
Goetz Lindenmaier
goetz at openjdk.org
Tue Jul 29 16:13:04 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).
Hi @cushon @jerboaa
We made a build with this change on top of 21.0.8 and gave it to our application team. Their testing succeeded. So from this side this can go.
Still this seems to me a quite complex change, reading all the review comments etc.. Also, there have been two issues, the one that caused the roll back and the current one this change fixes. Oracle did not try a second time to backport it as I understand. So should we really enable this again?
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1930#issuecomment-3133183880
More information about the jdk-updates-dev
mailing list