Skip to content

Stabilize SOS stack frame checks - #5952

Merged
max-charlamb merged 6 commits into
mainfrom
juhoyosa/stabilize-sos-stack-frames
Aug 10, 2026
Merged

max-charlamb merged 6 commits into
mainfrom
juhoyosa/stabilize-sos-stack-frames

Conversation

@hoyosjs

@hoyosjs hoyosjs commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

Fixes #5839.

Keep Foo2 and Foo4 as physical managed frames and require both independently in live DumpStack, DumpStack -EE, and EEStack output. Heap-dump replay still verifies that each command resolves managed MethodDesc records, but does not require specific raw-stack return-address slots that may be absent after dump-time exception processing. The heuristic , calling ... target remains optional because recognized indirect calls do not always expose a decodable target.

Breaking changes: None.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 486e1562-b17d-45b4-ad88-9ce540834a11
Copilot AI review requested due to automatic review settings August 5, 2026 05:24
@hoyosjs
hoyosjs requested a review from a team as a code owner August 5, 2026 05:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR stabilizes SOS stack-related unit tests by ensuring SymbolTestApp.Program.Foo2 and Foo4 remain physical managed frames (via NoInlining) and by updating stack verification patterns to require both frames across platforms while treating the , calling <target> suffix as optional.

Changes:

  • Added MethodImplOptions.NoInlining to Foo2 and Foo4 in SymbolTestApp to prevent frame elision via inlining.
  • Updated StackAndOtherTests.script to validate DumpStack, DumpStack -EE, and EEStack output by requiring both Foo4 and Foo2 frames independently and making the , calling ... portion optional.
  • Updated various source line expectations in the script(s) to account for the added attributes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/tests/SOS.UnitTests/Scripts/StackAndOtherTests.script Adjusts stack verification regexes and expected source line mappings; makes , calling ... optional and verifies both Foo4/Foo2 frames.
src/tests/SOS.UnitTests/Debuggees/SymbolTestApp/SymbolTestApp/SymbolTestApp.cs Adds NoInlining to Foo2 and Foo4 to keep frames present in stack traces consistently.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

hoyosjs added 3 commits August 4, 2026 22:46
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 486e1562-b17d-45b4-ad88-9ce540834a11
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 486e1562-b17d-45b4-ad88-9ce540834a11
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 486e1562-b17d-45b4-ad88-9ce540834a11
hoyosjs added 2 commits August 6, 2026 10:25
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 486e1562-b17d-45b4-ad88-9ce540834a11
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 486e1562-b17d-45b4-ad88-9ce540834a11
@max-charlamb

Copy link
Copy Markdown
Member

/ba-g Test failures in Microsoft.Diagnostics.Monitoring.EventPipe.UnitTests are unrelated to this SOS only change

@max-charlamb
max-charlamb merged commit c014870 into main Aug 10, 2026
21 of 25 checks passed
@hoyosjs
hoyosjs deleted the juhoyosa/stabilize-sos-stack-frames branch August 10, 2026 21:45
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DumpStack/EEStack regex mismatch on macOS

4 participants