-
Notifications
You must be signed in to change notification settings - Fork 222
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
8338379: Accesses to class init state should be properly synchronized #3317
base: master
Are you sure you want to change the base?
8338379: Accesses to class init state should be properly synchronized #3317
Conversation
Hi @MattAlp, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user MattAlp" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
❗ This change is not yet ready to be integrated. |
This backport pull request has now been updated with issue from the original commit. |
/signed |
Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
Already processed the |
#ifdef _LP64 | ||
assert(VM_Version::supports_fast_class_init_checks(), "must support fast class initialization checks"); | ||
__ clinit_barrier(rcx, r15_thread, nullptr /*L_fast_path*/, &slow_case); | ||
#else |
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 to be unrelated to this backport - this change was added for https://bugs.openjdk.org/browse/JDK-8320276
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.
Good call - though we still need to layer this commit to mitigate the ARM races we were seeing. I'll open a separate backport.
bool is_reentrant_initialization(Thread *thread) { return thread == _init_thread; } | ||
ClassState init_state() { return (ClassState)_init_state; } | ||
ClassState init_state() const { return (ClassState) Atomic::load_acquire(&_init_state); } | ||
const char* init_state_name() const; |
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 line change is not from the original changeset. It was added in https://bugs.openjdk.org/browse/JDK-8275775
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.
As this is a somewhat separate change (enhancing jcmd
), I opted to only include the change relevant to the race condition fix. I'll ask for maintainer input on the mailing list and backport JDK-8275775
in its entirety if that's preferred.
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 have verified that the changes correspond to the ones from the original changeset.
There are two locations, however, where some unrelated changes seem to have been brought in. Please, check and clean up as necessary.
Thanks!
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3317/head:pull/3317
$ git checkout pull/3317
Update a local copy of the PR:
$ git checkout pull/3317
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3317/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3317
View PR using the GUI difftool:
$ git pr show -t 3317
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3317.diff
Using Webrev
Link to Webrev Comment