Skip to content
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

8305104: Remove the old core reflection implementation #14371

Closed
wants to merge 12 commits into from

Conversation

mlchung
Copy link
Member

@mlchung mlchung commented Jun 7, 2023

JEP 416 integrated in JDK 18 and since then, only a couple minor issues has been reported. Those issues were related with exception being thrown with invalid arguments. We propose to remove the old core reflection implementation in JDK 22. The -Djdk.reflect.useDirectMethodHandle=false workaround to revert to the old implementation will stop to work.


Progress

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

Issues

  • JDK-8305104: Remove the old core reflection implementation (Enhancement - P4)
  • JDK-8309635: Remove the old core reflection implementation (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14371/head:pull/14371
$ git checkout pull/14371

Update a local copy of the PR:
$ git checkout pull/14371
$ git pull https://git.openjdk.org/jdk.git pull/14371/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14371

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14371.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 7, 2023

👋 Welcome back mchung! 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 openjdk bot added csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels Jun 7, 2023
@openjdk
Copy link

openjdk bot commented Jun 7, 2023

@mlchung The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot
  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added security security-dev@openjdk.org hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Jun 7, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 7, 2023

Webrevs

@mlchung mlchung changed the title 8305104: Remove old core reflection implementation 8305104: Remove the old core reflection implementation Jun 7, 2023
@mlchung
Copy link
Member Author

mlchung commented Jun 7, 2023

/label remove security

@openjdk openjdk bot removed the security security-dev@openjdk.org label Jun 7, 2023
@openjdk
Copy link

openjdk bot commented Jun 7, 2023

@mlchung
The security label was successfully removed.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hotspot code and test changes look fine. Thanks.

src/hotspot/share/classfile/verifier.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old + new implementations have been in four releases, which is good for shaking out any regressions/issues. Removing the old implementation in JDK 22 is good.

@openjdk
Copy link

openjdk bot commented Jun 9, 2023

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8305104: Remove the old core reflection implementation

Reviewed-by: dholmes, alanb

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Jun 9, 2023
Comment on lines 309 to 314
* 1. during VM early startup and method handle support is fully initialized
* 2. a Java native method
* 3. -Djdk.reflect.useNativeAccessorOnly=true is set
* 4. the member takes a variable number of arguments and the last parameter
* is an array (see details below)
* 5. the member's method type has an arity >= 255

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 1. during VM early startup and method handle support is fully initialized
* 2. a Java native method
* 3. -Djdk.reflect.useNativeAccessorOnly=true is set
* 4. the member takes a variable number of arguments and the last parameter
* is an array (see details below)
* 5. the member's method type has an arity >= 255
* 1. during VM early startup before method handle support is fully initialized
* 2. a Java native method
* 3. -Djdk.reflect.useNativeAccessorOnly=true is set
* 4. the member takes a variable number of arguments and the last parameter
* is not an array (see details below)
* 5. the member's method type has an arity >= 255

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks.

@mlchung
Copy link
Member Author

mlchung commented Jun 13, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Jun 13, 2023

Going to push as commit 9bfe415.
Since your change was applied there have been 42 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 13, 2023
@openjdk openjdk bot closed this Jun 13, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 13, 2023
@openjdk
Copy link

openjdk bot commented Jun 13, 2023

@mlchung Pushed as commit 9bfe415.

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

@mlchung mlchung deleted the remove-old-reflection branch August 2, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
5 participants