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

(v0.37.0-release) Remove setImmutableField on currentThread for JDK19 and up #17021

Conversation

a7ehuo
Copy link
Contributor

@a7ehuo a7ehuo commented Mar 24, 2023

Thread.currentThread can be changed by JCL in JDK19 and up. Set it as volatile for JDK19 and up.

Add isJ9VMThreadCurrentThreadImmutable in FrontEnd to query whether or not Thread.currentThread is immutable based on JAVA_SPEC_VERSION.

Cherry-picked:

Fixes #16258

`Thread.currentThread` can be changed by JCL in
JDK19 and up. Set it as volatile for JDK19 and up.

Add `isJ9VMThreadCurrentThreadImmutable` in FrontEnd
to query whether or not `Thread.currentThread` is
immutable based on `JAVA_SPEC_VERSION`.

Fixes eclipse-openj9#16258

Co-authored-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
@a7ehuo a7ehuo requested a review from 0xdaryl March 24, 2023 20:00
@a7ehuo
Copy link
Contributor Author

a7ehuo commented Mar 24, 2023

@0xdaryl Ready for review. Thanks!

@0xdaryl
Copy link
Contributor

0xdaryl commented Mar 24, 2023

@pshipton : I approved this. It can be merged anytime you want it. I wasn't sure if you wanted the master PR to go through a full test cycle or not first. It is generally a safe fix that only makes things more conservative.

@pshipton pshipton merged commit 8e750cf into eclipse-openj9:v0.37.0-release Mar 24, 2023
@pshipton
Copy link
Member

I'd rather have it in so it goes through weekend testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants