Repository navigation
Fix concurrent generic constraint cache publication - #135181
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: jkotas <[email protected]>
Co-authored-by: jkotas <[email protected]>
Copilot
AI
changed the title
[WIP] Fix concurrent generic constraint loading issue in CoreCLR
Fix concurrent generic constraint cache publication
Oct 4, 2026
jkotas
marked this pull request as ready for review
October 4, 2026 04:21
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The concurrency fix lacks deterministic regression coverage for the failing interleavings.
Review effort: Balanced
Findings: 1
What changed in this PR
Fixes a CoreCLR race by ensuring concurrent generic-constraint loaders populate one shared array before publishing coverage.
Changes:
- CAS-publishes the constraint array before population.
- Makes losing builders adopt the published array.
- Preserves coverage publication after slot initialization.
| File | Description |
|---|---|
src/coreclr/vm/typedesc.cpp |
Corrects concurrent constraint-cache publication. |
davidwrighton
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Concurrent first loads could publish
Allcoverage for a different, partially populated constraint array. This change makes concurrent builders share one loader-lifetime array and publishes coverage only after filling the slots it promises.Fixes #134243