-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8290482: Update JNI Specification of DestroyJavaVM for better alignment with JLS, JVMS, and Java SE API Specifications #10352
Conversation
…nt with JLS, JVMS, and Java SE API Specifications
👋 Welcome back dholmes! A progress list of the required criteria for merging this PR into |
@dholmes-ora The following labels will be automatically applied to this pull request:
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. |
Webrevs
|
/label add hotspot-runtime |
@dholmes-ora |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Thanks @robehn ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good. I looked at the specification changes and they looked okay also.
Thanks @coleenp ! |
CSR is now approved. |
@dholmes-ora 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:
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 103 new commits pushed to the
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 |
/integrate |
Going to push as commit e5b65c4.
Your commit was automatically rebased without conflicts. |
@dholmes-ora Pushed as commit e5b65c4. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This update is primarily about changes to the JNI Invocation API specification, mainly in relation to
DestroyJavaVM
. The motivation for the changes is to align with changes being made to the JLS, JVMS andjava.lang.Runtime
, specifications in relation to VM termination - ref:JDK-8290196 12.8: Clarify the definition of program exit
https://bugs.openjdk.org/browse/JDK-8290196
JDK-8290388 5.7: Clarify the definition of JVM termination
https://bugs.openjdk.org/browse/JDK-8290388
JDK-8290036 Define and specify Runtime shutdown sequence
https://bugs.openjdk.org/browse/JDK-8290036
Mostly these are just non-normative changes to the JNI spec prose but there are two actual specification changes:
The fact it is an error to detach a thread with active Java frames was only mentioned in the overview section, not in the actual
DetachCurrentThread
specification. (Just an oversight - the VM already checked this)We need to make it an error to call
DestroyJavaVM
from an attached thread with active Java frames (as this can't work for the same reason we disallowDetachCurrentThread
). This requires an implementation change in Hotspot.Issue 2 covers the code change, and regression test, in this PR.
In addition the specification changes can be seen here:
The specification itself is not open but comments on the spec changes are welcome - though please see the JBS issue and CSR request first. The revised wording has already been extensively reviewed/negotiated between Alex Buckley, Stuart Marks and myself, so any change must either be a glaring error/problem or else a trivial adjustment.
Thank you.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10352/head:pull/10352
$ git checkout pull/10352
Update a local copy of the PR:
$ git checkout pull/10352
$ git pull https://git.openjdk.org/jdk pull/10352/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10352
View PR using the GUI difftool:
$ git pr show -t 10352
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10352.diff