Skip to content

Fix concurrent CCW vtable and IID publication - #135650

Merged
AaronRobinsonMSFT merged 5 commits into
mainfrom
copilot/fix-concurrent-ccw-queries
Oct 16, 2026
Merged

AaronRobinsonMSFT merged 5 commits into
mainfrom
copilot/fix-concurrent-ccw-queries

Conversation

Copilot AI commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Concurrent CCW queries can observe readiness before vtable and descriptor initialization is published. Competing layout and lazy-IID flag updates can also lose bits, allowing a live vtable to be rebuilt.

  • Publication: Acquire-read shared flags and use pointer-width CAS updates that preserve existing bits. Publish class readiness after descriptor assignment and allocation ownership commit; enforce flags-offset alignment at compile time.
  • Lazy IID: Generate privately outside the existing Crst, then recheck and commit one immutable IID under the lock. Successful readers remain lock-free; CMT representation and contract-visible bits remain unchanged.
  • Coverage: Add fresh-type concurrent class-layout/IID-lookup and explicit-interface layout stress cases, followed by native calls.

@azure-pipelines

azure-pipelines Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Co-authored-by: AaronRobinsonMSFT <30635565+AaronRobinsonMSFT@users.noreply.github.com>
Comment thread src/coreclr/vm/comcallablewrapper.h Resolved
Copilot AI changed the title [WIP] Fix concurrent CCW queries observing incomplete vtables Fix concurrent CCW vtable and IID publication Oct 12, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Co-authored-by: AaronRobinsonMSFT <30635565+AaronRobinsonMSFT@users.noreply.github.com>
Co-authored-by: AaronRobinsonMSFT <30635565+AaronRobinsonMSFT@users.noreply.github.com>
Comment thread src/coreclr/vm/comcallablewrapper.h Resolved
Comment thread src/coreclr/vm/comcallablewrapper.h Resolved
Comment thread src/coreclr/vm/comcallablewrapper.cpp Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d60c7d11-aac7-47b6-8330-fa7d12e79437
@AaronRobinsonMSFT

Copy link
Copy Markdown
Member

/ba-g HTTP failure

@AaronRobinsonMSFT
AaronRobinsonMSFT enabled auto-merge (squash) October 16, 2026 22:35
@AaronRobinsonMSFT
AaronRobinsonMSFT merged commit 140bae6 into main Oct 16, 2026
100 of 102 checks passed
@AaronRobinsonMSFT
AaronRobinsonMSFT deleted the copilot/fix-concurrent-ccw-queries branch October 16, 2026 22:35
@github-project-automation github-project-automation Bot moved this to Done in AppModel Oct 16, 2026
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

Concurrent CCW queries can observe incomplete or reinitialized vtables

4 participants