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

8245227: VarHandle adaptation fails when non-crackable direct method handles are used as adapters #177

Conversation

@mcimadamore
Copy link
Collaborator

@mcimadamore mcimadamore commented May 18, 2020

Not all direct method handles are crackable with revealDirect. When such adapters are enountered by the logic which checks for absence of exception, an exception is thrown - since the code tries to test as to whether the adapter is a direct handle and if so, an invocation to revealDirect occurs.

The solution is to obtain the member name from the direct handle and then take it from there (note that in such cases, the member name is still set to the one of the crackable handle), and to avoid the more public revealDirect API.


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Issue

  • JDK-8245227: VarHandle adaptation fails when non-crackable direct method handles are used as adapters

Reviewers

  • Paul Sandoz (psandoz - Committer)

Download

$ git fetch https://git.openjdk.java.net/panama-foreign pull/177/head:pull/177
$ git checkout pull/177

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 18, 2020

👋 Welcome back mcimadamore! A progress list of the required criteria for merging this PR into foreign-memaccess will be added to the body of your pull request.

@openjdk openjdk bot added the rfr label May 18, 2020
@mcimadamore mcimadamore force-pushed the mcimadamore:crackableHandlesAdaptFix branch from 6b12c49 to c4e734d May 18, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 18, 2020

Webrevs

@openjdk
Copy link

@openjdk openjdk bot commented May 18, 2020

@mcimadamore This change now passes all automated pre-integration checks, type /integrate in a new comment to proceed. After integration, the commit message will be:

8245227: VarHandle adaptation fails when non-crackable direct method handles are used as adapters

Reviewed-by: psandoz
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

There are currently no new commits on the foreign-memaccess branch since the last update of the source branch of this PR. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you would like to avoid potential automatic rebasing, specify the current head hash when integrating, like this: /integrate e2d2dba6f2c7c5ad1247be3cffc098b830242919.

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

@openjdk openjdk bot added the ready label May 18, 2020
@mcimadamore
Copy link
Collaborator Author

@mcimadamore mcimadamore commented May 18, 2020

/integrate

@openjdk openjdk bot closed this May 18, 2020
@openjdk openjdk bot added integrated and removed ready labels May 18, 2020
@openjdk
Copy link

@openjdk openjdk bot commented May 18, 2020

@mcimadamore
Pushed as commit 6450214.

@openjdk openjdk bot removed the rfr label May 18, 2020
@mcimadamore mcimadamore deleted the mcimadamore:crackableHandlesAdaptFix branch Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.