Repository navigation
[release/11.0] Prevent clipboard hangs during concurrent data-store access - #15329
Merged
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
JeremyKuhne
approved these changes
Oct 29, 2026
yaqiyang
approved these changes
Oct 29, 2026
Member
|
Approved over email. |
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.
Fixes 3084829
Backport of #15319 to release/11.0
/cc @Shyam-Gupta @nareshjo
Root Cause
The clipboard data store reads, writes, and enumerates its format dictionary without synchronization. Concurrent mutation can corrupt dictionary state; on .NET Framework, a corrupted bucket chain can cause a later lookup to loop indefinitely.
Proposed changes
Customer Impact
Regression?
Risk
Low expected compatibility risk. The per-store gate protects dictionary access and snapshot creation; validation, deserialization, format mapping, and explicit COM calls stay outside locked sections. Payload ownership is unchanged. Lock contention and larger snapshots add potential performance costs.
Test methodology
Test environment(s)
net481).net11.0-windows7.0, executed using the repository-selected .NET runtime12.0.0-alpha.1.26519.114.12.0.100-alpha.1.26480.102.Microsoft Reviewers: Open in CodeFlow