-
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
8297600: Check current thread in selected JRT_LEAF methods #11359
Conversation
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
Unclear for many JVMCI functions that the thread argument is actually intended/required to be the current thread. It seems unused in many cases so why is it passed?
Yes, I agree the initial patch over-reached in some places. Please see new commit, which reduces it. I left |
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.
That seems more recognisably correct. It would be even better if thread
were named current
in those cases where it must be, but that is a separate RFE.
Thanks.
@shipilev 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 63 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 |
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.
I thought this was going to be in the JRT_LEAF macro in interfaceSupport.inline.hpp but this seems fine.
Thanks! I am integrating then. /integrate |
Going to push as commit b3501fd.
Your commit was automatically rebased without conflicts. |
With JDK-8275286, we added the
Thread::current()
checks for most of the JRT entries. ButJRT_LEAF
is still not checked, because not everyJRT_LEAF
carries aJavaThread
argument. Having assertions there helps for two reasons. First, these methods can be called from the stub/compiler code, which might be erroneous with thread handling (especially in x86_32 that does not have a dedicated thread register). Second, in the post-Loom world, current thread can change suddenly, as evidenced here: https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2022-November/060779.html.We can add the thread checks to relevant
JRT_LEAF
methods that acceptJavaThread*
too.Additional testing:
tier1
tier2
tier1
tier2
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11359/head:pull/11359
$ git checkout pull/11359
Update a local copy of the PR:
$ git checkout pull/11359
$ git pull https://git.openjdk.org/jdk pull/11359/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11359
View PR using the GUI difftool:
$ git pr show -t 11359
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11359.diff