Repository navigation
Update dumpdelegate for .NET 11 layout - #5977
Merged
Merged
Conversation
Support both the legacy MulticastDelegate invocation-list fields and the new .NET 11 Delegate helper-object layout. Treat helper objects as multicast lists only when they are arrays with a valid element count, preserving single-target delegate output. Co-authored-by: Copilot <[email protected]> Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
Contributor
There was a problem hiding this comment.
Pull request overview
Updates SOS !dumpdelegate to understand the .NET 11 delegate multicast layout changes while preserving legacy multicast handling, so delegate invocation lists can still be walked correctly across runtime versions.
Changes:
- Adds support for reading multicast invocation data from either legacy
_invocationList/_invocationCountor .NET 11_helperObject/_extraData. - Adds a check to distinguish true multicast invocation-list arrays from non-array helper objects before iterating entries.
- Refactors the command flow to either enqueue multicast entries for traversal or print single-target delegate target/method information.
Show a summary per file
| File | Description |
|---|---|
| src/SOS/Strike/strike.cpp | Updates !dumpdelegate to handle .NET 11 multicast delegate layout while retaining legacy behavior and avoiding walking non-array helper objects. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (1)
src/SOS/Strike/strike.cpp:2355
- Same issue here: GetObjFieldOffset can return -1 on error, but
!= 0will treat that as a valid offset andMOVEfrom an invalid address. Use> 0before dereferencing.
if ((offset = GetObjFieldOffset(delegateObj.GetAddress(), delegateObj.GetMT(), W("_target"))) != 0)
{
MOVE(target, delegateObj.GetAddress() + offset);
}
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Treat GetObjFieldOffset failures as invalid instead of dereferencing the returned -1 offset. Apply the positive-offset check to both delegate layouts and the single-target fallback. Co-authored-by: Copilot <[email protected]> Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
leculver
added a commit
to leculver/diagnostics
that referenced
this pull request
Aug 25, 2026
Keep the .NET 11 dumpdelegate product change isolated in dotnet#5977 rather than coupling it to the SOS test harness branch. Co-authored-by: Copilot <[email protected]> Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
max-charlamb
approved these changes
Aug 25, 2026
This was referenced Aug 26, 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.
Summary
!dumpdelegateFound through putting the new sos test harness through its paces, just a change in implementation in net 11.