-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8304164: jdk/classfile/CorpusTest.java still fails after JDK-8303910 #13037
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
Conversation
👋 Welcome back asotona! A progress list of the required criteria for merging this PR into |
if (res == null && !resolvedCache.containsKey(classDesc)) { | ||
//using NOPE to distinguish between null value and non-existent record in the cache | ||
//this code is on JDK bootstrap critical path, so cannot use lambdas here | ||
var res = resolvedCache.getOrDefault(classDesc, NOPE); |
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.
resolvedCache
is a Collections.synchronizedMap
backed by a HashMap
. So the getOrDefault()
(internally) synchronizes on the resolvedCache
instance itself and thus this operation would be thread safe in context of access to this cache in rest of this code. So what you propose here looks good to me.
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.
Thank you.
@asotona 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 26 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 b2639e1.
Your commit was automatically rebased without conflicts. |
Massive parallel execution of parametrised CorpusTest junit tests revealed race condition in
ClassHierarchyImpl.CachedClassHierarchyResolver::getClassInfo
.The race condition may skip calculation of the ClassHierarchyInfo. In this specific case it caused SegmentScope not being identified as an interface and verify error on assignability between declared method return type and actual returned type has been emitted by the test.
Proposed patch fixes the race condition in
ClassHierarchyImpl.CachedClassHierarchyResolver::getClassInfo
.Please review.
Thank you,
Adam
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/13037/head:pull/13037
$ git checkout pull/13037
Update a local copy of the PR:
$ git checkout pull/13037
$ git pull https://git.openjdk.org/jdk pull/13037/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13037
View PR using the GUI difftool:
$ git pr show -t 13037
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13037.diff