Skip to content
This repository has been archived by the owner. It is now read-only.

8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation #27

Closed
wants to merge 2 commits into from

Conversation

vnkozlov
Copy link

@vnkozlov vnkozlov commented Dec 15, 2021

A proper fix for this is to use the catchException combination. However, that introduces significant cold startup performance regression. JDK-8278447 tracks the work to address the performance regression using catchException and asSpreader combinator. It may require significant work and refactoring which is risky for JDK 18.

It is proposed to implement a workaround in C2 to white list the relevant methods (all methods in sun.invoke.util.ValueConversions class) not to omit stack trace when exception is thrown in them.

Added new regression test. Tested tier1-3.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk18 pull/27/head:pull/27
$ git checkout pull/27

Update a local copy of the PR:
$ git checkout pull/27
$ git pull https://git.openjdk.java.net/jdk18 pull/27/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk18/pull/27.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 15, 2021

👋 Welcome back kvn! 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 the rfr label Dec 15, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2021

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

  • core-libs
  • hotspot

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 hotspot core-libs labels Dec 15, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 15, 2021

Webrevs

@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2021

@vnkozlov 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:

8277964: ClassCastException with no stack trace is thrown with -Xcomp in method handle invocation

Reviewed-by: dlong, mchung, dholmes

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 2 new commits pushed to the master branch:

  • 69b5d49: 8272064: test/jdk/jdk/jfr/api/consumer/TestHiddenMethod.java needs update for JEP 416
  • d6b5544: 8278607: Misc issues in foreign API javadoc

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.

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

@openjdk openjdk bot added the ready label Dec 15, 2021
Copy link
Member

@mlchung mlchung left a comment

Looks good. Thanks for taking this on.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Looks good.

Thanks,
David

@vnkozlov
Copy link
Author

@vnkozlov vnkozlov commented Dec 15, 2021

Thank you, David, Dean and Mandy for reviews.

@vnkozlov
Copy link
Author

@vnkozlov vnkozlov commented Dec 15, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2021

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

  • 69b5d49: 8272064: test/jdk/jdk/jfr/api/consumer/TestHiddenMethod.java needs update for JEP 416
  • d6b5544: 8278607: Misc issues in foreign API javadoc

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Dec 15, 2021
@openjdk openjdk bot closed this Dec 15, 2021
@openjdk openjdk bot removed ready rfr labels Dec 15, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 15, 2021

@vnkozlov Pushed as commit d3408a4.

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

@vnkozlov vnkozlov deleted the JDK-8277964 branch Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core-libs hotspot integrated
4 participants