Repository navigation
Order sync-table lookups and SyncBlock publication - #135179
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 <6668460+jkotas@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix concurrent sync-table growth to prevent out of bounds reads
Order sync-table lookups and SyncBlock publication
Oct 4, 2026
Contributor
|
Tagging subscribers to this area: @agocke |
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
These VM memory-ordering changes need maintainer review and optimized x64/Arm64 correctness and performance validation.
Review effort: Balanced
Findings: 1
What changed in this PR
Addresses #134252 by ordering CoreCLR sync-table lookups and publishing fully initialized SyncBlocks without adding reader locks.
Changes:
- Acquire-load the header index, table, and entry while preserving DAC access.
- Set lifetime metadata before release-publishing SyncBlocks.
- Route RCW and ETW readers through acquire loads.
No builds, tests, or benchmarks were run.
| File | Description |
|---|---|
| src/coreclr/vm/syncblk.h | Adds ordered acquire lookups and preserves DAC access. |
| src/coreclr/vm/syncblk.cpp | Orders validation reads and SyncBlock publication. |
| src/coreclr/vm/runtimecallablewrapper.h | Updates RCW object and block lookups. |
| src/coreclr/vm/runtimecallablewrapper.cpp | Acquire-loads the block during RCW initialization. |
| src/coreclr/vm/eventtrace_bulktype.cpp | Updates ETW table and block reads. |
jkotas
reviewed
Oct 4, 2026
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
jkotas
reviewed
Oct 4, 2026
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
jkotas
reviewed
Oct 4, 2026
jkotas
reviewed
Oct 4, 2026
jkotas
reviewed
Oct 4, 2026
jkotas
reviewed
Oct 5, 2026
jkotas
reviewed
Oct 5, 2026
jkotas
reviewed
Oct 5, 2026
jkotas
reviewed
Oct 5, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Lock-free publication and GC-lifetime changes require final maintainer review and architecture-specific validation beyond this source-only assessment.
Review effort: Balanced
Findings: 2
Open (2)
Resolved since last review (1)
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
jkotas
marked this pull request as ready for review
October 5, 2026 06:12
jkotas
reviewed
Oct 5, 2026
jkotas
reviewed
Oct 5, 2026
davidwrighton
approved these changes
Oct 5, 2026
jkotas
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Passive lookups must acquire the object-header bits before resolving the index through g_pSyncTable; this prevents combining an older table base with a newer index. Initialized SyncBlocks are release-published before a newly allocated index is published.
Fixes #134252