Skip to content

Conversation

@liach
Copy link
Member

@liach liach commented Oct 8, 2024

An out-of-spec behavior of core reflection causes it to fail when it encounters class files that conform to JVMS for release 8. In JVMS § 4.7.24 parameters are allowed to have null (CP reference 0) names, but core reflection didn't accept it.

This problem was relatively obscure, but it has been exacerbated when javac for release 21 and later starts generating such parameters in MethodParameters attribute. Since this is a problem with Java 8, I propose to backport this related fix onto 8 instead of changing latest releases.

This pull request contains a backport of commit cba5bd26 from the openjdk/jdk repository. The commit being backported was authored by Eric McCorkle on 11 Nov 2014 and was reviewed by Coleen Phillimore and David Holmes.

A backport request is included in the latest comment in the original JBS issue.

An original pull request openjdk/jdk8u#63 was made against the wrong repository.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8058322 needs maintainer approval

Issue

  • JDK-8058322: Zero name_index item of MethodParameters attribute cause MalformedParameterException. (Bug - P4 - Approved)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 592

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 8, 2024

👋 Welcome back liach! 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.

@openjdk
Copy link

openjdk bot commented Oct 8, 2024

@liach This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8058322: Zero name_index item of MethodParameters attribute cause MalformedParameterException.

Allow hotspot to report null for 0 parameter_name index in MethodParameters attribute

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the master branch:

  • 432d962: 8048003: test/compiler/8009761/Test8009761.java failed with: java.lang.RuntimeException: static java.lang.Object Test8009761.m3(boolean,boolean) not compiled

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title Backport cba5bd26387dc2ecb31ac8d6bea21bcc01da0cd5 8058322: Zero name_index item of MethodParameters attribute cause MalformedParameterException. Oct 8, 2024
@openjdk
Copy link

openjdk bot commented Oct 8, 2024

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

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required approval Requires approval; will be removed when approval is received rfr Pull request is ready for review labels Oct 8, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 8, 2024

Webrevs

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Oct 24, 2024
@liach
Copy link
Member Author

liach commented Oct 24, 2024

Thanks for the approval. The tier 1 test failures are 2 certificates on all platforms which should be fixed by #597, and a few crashes in macOS x64. No new failures related to this backport, so I will go ahead and integrate.

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 24, 2024
@openjdk
Copy link

openjdk bot commented Oct 24, 2024

@liach
Your change (at version abc2122) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Oct 24, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 24, 2024

Going to push as commit b6616d6.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 432d962: 8048003: test/compiler/8009761/Test8009761.java failed with: java.lang.RuntimeException: static java.lang.Object Test8009761.m3(boolean,boolean) not compiled

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 24, 2024
@openjdk openjdk bot closed this Oct 24, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Oct 24, 2024
@openjdk
Copy link

openjdk bot commented Oct 24, 2024

@jerboaa @liach Pushed as commit b6616d6.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants