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

8279437: [JVMCI] exception in HotSpotJVMCIRuntime.translate can exit the VM #6951

Closed
wants to merge 3 commits into from

Conversation

dougxc
Copy link
Member

@dougxc dougxc commented Jan 4, 2022

This PR addresses the problem reported in JDK-8279437 by adding support for transferring exceptions from HotSpot into libgraal (the other way around was already supported).
It also improves the translation of exceptions by:

  • using a native (resource) buffer more directly for serializing an exception
  • changing the serialization format to be a gzipped binary representation as it is much smaller than the string representation currently used and avoids having to worry about special characters (e.g. a | in an exception's message string).

It also adds the jvmci.ForceTranslateFailure option to allow testing handling of failures in HotSpotJVMCIRuntime.translate. See oracle/graal@b3a6ce4 for such a test.


Progress

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

Issue

  • JDK-8279437: [JVMCI] exception in HotSpotJVMCIRuntime.translate can exit the VM

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6951

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 4, 2022

👋 Welcome back dnsimon! 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 Jan 4, 2022

@dougxc The following label will be automatically applied to this pull request:

  • hotspot-compiler

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

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jan 4, 2022
@dougxc dougxc marked this pull request as ready for review January 4, 2022 10:05
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 4, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 4, 2022

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good. Thank you for testing it.

@openjdk
Copy link

openjdk bot commented Jan 4, 2022

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

8279437: [JVMCI] exception in HotSpotJVMCIRuntime.translate can exit the VM

Reviewed-by: kvn

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

  • 191f730: Merge
  • 95a3010: 8275830: C2: Receiver downcast is missing when inlining through method handle linkers
  • 58b5fb3: 8265317: [vector] assert(payload->is_object()) failed: expected 'object' value for scalar-replaced boxed vector but got: NULL
  • 06f3713: 8279379: GHA: Print tests that are in error
  • e7244c1: 8278966: two microbenchmarks tests fail "assert(!jvms->method()->has_exception_handlers()) failed: no exception handler expected" after JDK-8275638
  • b4b0328: 8278824: Uneven work distribution when scanning heap roots in G1
  • 99a8351: 8279386: Remove duplicate RefProcPhaseTimeTracker
  • d1e6f26: 8279351: [TESTBUG] SADebugDTest.java does not handle "Address already in use" error
  • 93c7d90: 8278282: G1: Log basic statistics for evacuation failure
  • 1ffdc52: 8279412: [JVMCI] failed speculations list must outlive any nmethod that refers to it
  • ... and 5 more: https://git.openjdk.java.net/jdk/compare/c295e71b49db20ab398ae1e8ba504d8ebff5fb77...master

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 Pull request is ready to be integrated label Jan 4, 2022
@vnkozlov
Copy link
Contributor

vnkozlov commented Jan 4, 2022

Please, update copyright year to 2022 in changed files.

@dougxc
Copy link
Member Author

dougxc commented Jan 4, 2022

Please, update copyright year to 2022 in changed files.

I've done it but this should really be automated some how. I thought there is (was?) a script that runs over all JDK sources once a year to fix copyright dates?

@dougxc
Copy link
Member Author

dougxc commented Jan 8, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jan 8, 2022

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

  • 77757ba: 8225122: Test AncestorResized.java fails when Windows desktop is scaled.
  • f203723: 8279337: The MToolkit is still referenced in a few places
  • d47af74: 8279500: Remove FileMapHeader::_heap_obj_roots
  • 4243f4c: 8279540: Shenandoah: Should only clear CLD::_claim_strong mark for strong CLD iterations
  • 62d03c2: 8279547: [vectorapi] Enable vector cast tests after JDK-8278948
  • 6a42fba: 8279258: Auto-vectorization enhancement for two-dimensional array operations
  • 8d0f385: 8279520: SPNEGO has not passed channel binding info into the underlying mechanism
  • b3dbfc6: 4884570: StreamPrintService.isAttributeValueSupported does not work properly for SheetCollate
  • 8703f14: 8273322: Enhance macro logic optimization for masked logic operations.
  • bc12381: 8279505: Update documentation for RETRY_COUNT and REPEAT_COUNT
  • ... and 33 more: https://git.openjdk.java.net/jdk/compare/c295e71b49db20ab398ae1e8ba504d8ebff5fb77...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 8, 2022

@dougxc Pushed as commit e14fb4f.

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

@dougxc dougxc deleted the JDK-8279437 branch May 23, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants