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

Add synchronization for Class.allPermissionsPD #21073

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

babsingh
Copy link
Contributor

@babsingh babsingh commented Feb 5, 2025

Synchronization has been added to ensure safe initialization and safe
publication of Class.allPermissionsPD. This addresses the locking
contention on Class.allPermissionsPD in Class.getProtectionDomain().

Fixes: #20351

Synchronization has been added to ensure safe initialization and safe
publication of Class.allPermissionsPD. This addresses the locking
contention on Class.allPermissionsPD in Class.getProtectionDomain().

Fixes: eclipse-openj9#20351

Signed-off-by: Babneet Singh <[email protected]>
@babsingh
Copy link
Contributor Author

babsingh commented Feb 5, 2025

@pshipton Can you please review these changes?

babsingh added a commit to babsingh/aqa-tests that referenced this pull request Feb 5, 2025
ProtectionDomainRace has been fixed by
eclipse-openj9/openj9#21073.

Signed-off-by: Babneet Singh <[email protected]>
@babsingh
Copy link
Contributor Author

babsingh commented Feb 5, 2025

The AssertionError in #20351 is seen because Class.getProtectionDomain() returns different values for Class.allPermissionsPD (race condition).

Also, adoptium/aqa-tests#5942 has been opened to re-enable the test. It will be in a draft state until this PR is merged.

babsingh added a commit to babsingh/aqa-tests that referenced this pull request Feb 5, 2025
ProtectionDomainRace has been fixed by
eclipse-openj9/openj9#21073

Signed-off-by: Babneet Singh <[email protected]>
@pshipton pshipton merged commit f6f1da0 into eclipse-openj9:master Feb 6, 2025
2 checks passed
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.

jdk24 java.lang.AssertionError: sun.security.util.ResourcesMgr (PD)
3 participants