[cDAC] Fix stale Continuation MT bug#129109
Merged
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes continuation-related globals in the cDAC RuntimeTypeSystem contract resilient to late initialization by lazily re-reading the globals when cached values are still null, rather than only capturing them at contract construction time.
Changes:
- Make continuation MT / singleton EEClass pointers lazily refreshed in
RuntimeTypeSystem_1when still null. - Add the same lazy refresh behavior in
TypeValidationso MethodTable validation can succeed once the target initializes the globals.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/RuntimeTypeSystemHelpers/TypeValidation.cs | Lazily re-reads continuation globals when cached values are null, enabling validation paths to recover on live targets. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs | Lazily re-reads continuation globals in the main contract implementation so IsContinuationWithoutMetadata can work after late initialization. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
max-charlamb
approved these changes
Jun 8, 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.
_continuationMethodTablePointer and _continuationSingletonEEClassPointer are not filled on startup, but on the first creation of a Continuation without metadata. Therefore, on a live target we may read a null MT if we only read upon contract creation. Update this such that if these are still null, we try again to read them.