Skip to content

[cDAC] Add stackwalk DAC flags - #11

Open
anurag6569201 wants to merge 1 commit into
qa/agent-dotnet-runtime/pr-11-131901/basefrom
qa/agent-dotnet-runtime/pr-11-131901/head
Open

anurag6569201 wants to merge 1 commit into
qa/agent-dotnet-runtime/pr-11-131901/basefrom
qa/agent-dotnet-runtime/pr-11-131901/head

Conversation

@anurag6569201

Copy link
Copy Markdown

Fixes dotnet#112366

Source merge-base: 7ddca6ea6099f3983e9b6d63d52acd9337bfcb7a
Source head: 714df81a197342a8e4562ed7a3e9807b57846df6

@shipwright-agent

Copy link
Copy Markdown

⛔ Shipwright · Blocked

Recommendation: do not merge PR #11 · Tier T1
Checks: 0 total · 0 needing attention

Next step: resolve the blocking findings before merge.

Findings (4)

  • CRITICAL The IsLegacyVisible logic now hides Frame and SkippedFrame states unless CLRDATA_SIMPFRAME_RUNTIME_UNMANAGED_CODE is set. · src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataStackWalk.cs:57
    • Fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.
  • HIGH The 'IsLegacyVisible' logic was changed from returning true for 'Frameless', 'Frame', or 'SkippedFrame' states to only returning true for 'Frameless' unless the 'CLRDATA_SIMPFRAME_ · src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataStackWalk.cs:57
    • Fix: Fix the review finding before release.
  • HIGH The flag name CLRDATA_SIMPFRAME_RUNTIME_UNMANAGED_CODE is used to gate visibility of Frame and SkippedFrame states, but the name suggests it controls unmanaged runtime frames. · src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataStackWalk.cs:57
    • Fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.
  • HIGH The new CLRDataStackWalkFlag enum is declared with [Flags] but only defines value 0x8. · src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/IXCLRData.cs:999
    • Fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.

Fireworks usage: 7,284 input · 555 output · 7,839 total tokens · $0.0020 · 10s · 0 fix iteration(s)

Open the Shipwright check for full evidence and the audit bundle. Use /shipwright rerun to verify again.

}

internal static bool IsLegacyVisible(IStackDataFrameHandle frame)
internal bool IsLegacyVisible(IStackDataFrameHandle frame)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shipwright · CRITICAL

The IsLegacyVisible logic now hides Frame and SkippedFrame states unless CLRDATA_SIMPFRAME_RUNTIME_UNMANAGED_CODE is set.

Impact: The IsLegacyVisible logic now hides Frame and SkippedFrame states unless CLRDATA_SIMPFRAME_RUNTIME_UNMANAGED_CODE is set. Any existing caller that invokes CreateStackWalk with flags=0 (the common default) will silently lose managed frames that were previously visible, producing truncated or empty stack walks in production diagnostics. This is a behavioral regression, not an additive flag.

Suggested fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.

}

internal static bool IsLegacyVisible(IStackDataFrameHandle frame)
internal bool IsLegacyVisible(IStackDataFrameHandle frame)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shipwright · HIGH

The 'IsLegacyVisible' logic was changed from returning true for 'Frameless', 'Frame', or 'SkippedFrame' states to only returning true for 'Frameless' unless the 'CLRDATA_SIMPFRAME_

Impact: The 'IsLegacyVisible' logic was changed from returning true for 'Frameless', 'Frame', or 'SkippedFrame' states to only returning true for 'Frameless' unless the 'CLRDATA_SIMPFRAME_RUNTIME_UNMANAGED_CODE' flag is set. This means frames in 'Frame' or 'SkippedFrame' states are now hidden by default, which is a behavioral regression for stack walks that do not set this flag. The previous behavior treated these states as…

Suggested fix: Fix the review finding before release.

}

internal static bool IsLegacyVisible(IStackDataFrameHandle frame)
internal bool IsLegacyVisible(IStackDataFrameHandle frame)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shipwright · HIGH

The flag name CLRDATA_SIMPFRAME_RUNTIME_UNMANAGED_CODE is used to gate visibility of Frame and SkippedFrame states, but the name suggests it controls unmanaged runtime frames.

Impact: The flag name CLRDATA_SIMPFRAME_RUNTIME_UNMANAGED_CODE is used to gate visibility of Frame and SkippedFrame states, but the name suggests it controls unmanaged runtime frames. The relationship between the flag and the visibility behavior is non-obvious and undocumented, making future maintenance error-prone.

Suggested fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.

CLRDATA_STACK_WALK_REQUEST_SET_FIRST_FRAME = 0xe1000000,
}

[Flags]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shipwright · HIGH

The new CLRDataStackWalkFlag enum is declared with [Flags] but only defines value 0x8.

Impact: The new CLRDataStackWalkFlag enum is declared with [Flags] but only defines value 0x8. Callers passing arbitrary uint values cast to this enum can set undefined bits; IsLegacyVisible only checks one bit, so unknown flag combinations are silently ignored. This weakens validation at the interop boundary and can mask caller errors.

Suggested fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant