Skip to content

8334870: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes #1930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cushon
Copy link
Contributor

@cushon cushon commented Jun 27, 2025

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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Change requires CSR request JDK-8360895 to be approved
  • Commit message must refer to an issue
  • JDK-8334870 needs maintainer approval

Warning

 ⚠️ Found leading lowercase letter in issue title for 8334870: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes

Issues

  • JDK-8334870: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes (Bug - P4)
  • JDK-8360895: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes (CSR)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1930/head:pull/1930
$ git checkout pull/1930

Update a local copy of the PR:
$ git checkout pull/1930
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1930/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1930

View PR using the GUI difftool:
$ git pr show -t 1930

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1930.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 27, 2025

👋 Welcome back cushon! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@cushon cushon changed the title Backport JDK-8334871 Backport JDK-8334870 Jun 27, 2025
@openjdk
Copy link

openjdk bot commented Jun 27, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport JDK-8334870 8334871: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes Jun 27, 2025
@openjdk
Copy link

openjdk bot commented Jun 27, 2025

This backport pull request has now been updated with the original issue, but not the original commit. If you have the original commit hash, please update the pull request title with Backport <hash>.

@openjdk openjdk bot added the backport label Jun 27, 2025
@cushon cushon changed the title 8334871: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes Backport 5e822c24bb42e9027c8d9090d498bca7125d1963 Jun 27, 2025
@openjdk openjdk bot changed the title Backport 5e822c24bb42e9027c8d9090d498bca7125d1963 8334870: javac does not accept classfiles with certain permitted RuntimeVisibleParameterAnnotations and RuntimeInvisibleParameterAnnotations attributes Jun 27, 2025
@openjdk
Copy link

openjdk bot commented Jun 27, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented Jun 27, 2025

At least one of the issues associated with this backport has a resolved CSR for a different version. As this means that this backport may also need a CSR, the csr label is being added to this pull request to signal this potential requirement. The command /csr unneeded can be used to remove the label in case a CSR is not needed.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Jun 27, 2025
@cushon cushon marked this pull request as ready for review June 27, 2025 16:19
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 27, 2025
@mlbridge
Copy link

mlbridge bot commented Jun 27, 2025

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport csr Pull request needs approved CSR before integration rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant