Skip to content

[cDAC] Fix ARM64 save_any opcode decoding - #132187

Merged
rcj1 merged 2 commits into
dotnet:mainfrom
rcj1:arm64-unwind-audit
Aug 12, 2026
Merged

rcj1 merged 2 commits into
dotnet:mainfrom
rcj1:arm64-unwind-audit

Conversation

@rcj1

@rcj1 rcj1 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 11b73ad8-c726-42c3-bc38-a8360c68b4de
@rcj1
rcj1 requested review from max-charlamb and noahfalk and a lite review from Copilot and removed request for Copilot August 11, 2026 23:51
@rcj1 rcj1 self-assigned this Aug 11, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@rcj1
rcj1 requested a review from hoyosjs August 11, 2026 23:52
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@rcj1
rcj1 enabled auto-merge (squash) August 11, 2026 23:57

@max-charlamb max-charlamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks

Copilot AI lite review requested due to automatic review settings August 12, 2026 17:29

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 corrects ARM64 unwind-code decoding for the save_any_* opcode in cDAC stack unwinding, ensuring the p/x/fixed bitfields are read from the correct byte, and adds a focused unit test to validate restoring a saved non-volatile register pair.

Changes:

  • Fix save_any bitfield extraction in ARM64Unwinder.SaveAnyUnwindCode to decode x, p, and the fixed-op bit from the 0pxrrrrr byte (not the ffoooooo byte).
  • Add a unit test that constructs minimal ARM64 .pdata/.xdata + stack memory to validate save_any pair restore behavior for X19/X20.
Show a summary per file
File Description
src/native/managed/cdac/tests/UnitTests/StackWalkTests.cs Adds a regression unit test covering ARM64 save_any pair unwind restoring saved registers from the stack.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/Context/ARM64/ARM64Unwinder.cs Fixes ARM64 save_any opcode decoding by extracting x/p/fixedOp from the correct encoding byte.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

@rcj1
rcj1 merged commit 7a6684f into dotnet:main Aug 12, 2026
71 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 13, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants