You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[cDAC] ClrDataFrame.GetContext should use contextFlags to compute required context size #125791
ClrDataFrame.GetContext in the managed cDAC always returns the full platform context regardless of the contextFlags parameter. The native DAC implementation (stack.cpp) uses ContextSizeForFlags to compute the required context size based on the requested flags, and only copies/requires that subset.
Current Behavior
The cDAC implementation ignores contextFlags and always:
Reports contextSize as the full platform context length
Requires contextBufSize >= full context length (returns E_INVALIDARG otherwise)
Copies the entire context into the output buffer
Expected Behavior
Should match the native DAC:
Use contextFlags to compute the required size via a ContextSizeForFlags equivalent
// TODO: Use contextFlags to compute the required size via ContextSizeForFlags// (see native ClrDataFrame::GetContext in stack.cpp). Currently we always// return the full platform context regardless of the requested flags.
Impact
Currently callers that pass a smaller buffer sized for a subset of context flags will get E_INVALIDARG even though the native DAC would succeed. This doesn't affect SOS's !clrstack (which always requests the full context), but could affect other diagnostic tools.
Activity
dotnet-policy-service commentedon Mar 19, 2026
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.
Remove raw signature fallback, track known gaps as issues
Link GitHub issues in TODO comments
[cDAC] Implement GetArgumentByIndex and GetLocalVariableByIndex on Cl…
rcj1 commentedon Aug 5, 2026
Moving this to 12 because nothing that I can see uses it.