Skip to content

[release/11.0] Preserve ARM64 PAC masks in macOS core dumps - #138080

Merged
steveisok merged 1 commit into
dotnet:release/11.0from
max-charlamb:backport-138041-release-11.0
Dec 1, 2026
Merged

steveisok merged 1 commit into
dotnet:release/11.0from
max-charlamb:backport-138041-release-11.0

Conversation

@max-charlamb

Copy link
Copy Markdown
Member

Fixes Issue No separate issue; manual backport of #138041.

main PR #138041

Description

Backport #138041 to release/11.0. ARM64 macOS core dumps gain the version-4 "addrable bits" LC_NOTE, using machdep.virtual_address_size to describe the valid address bits so debuggers can strip PAC signatures from return addresses.

The automatic cherry-pick conflicted because main moved these files into createdump/shared/. This manual port applies the changes to the release branch's existing paths. The only other adaptation is using the equivalent HOST_ARM64 architecture guard.

Customer Impact

Without this metadata, LLDB can retain PAC signing bits in return addresses from arm64e system libraries, preventing native stack unwinding through those frames when analyzing a core dump.

Regression

Not a newly introduced regression. This fills a gap in macOS ARM64 dump metadata.

Testing

  • git diff --check: passed.
  • sh run.sh: passed in an ad hoc isolated writer harness on osx.26.arm64.open (Helix log). The harness compiled the backported writer against macOS headers with mocked process state. All 16 ARM64 cases and two cases with the ARM64 guard disabled passed, covering note payload and offsets, command counts, segment alignment, invalid/failed sysctl results, and write failures. The live sysctl returned 47 address bits; the worker reported PAC hardware support. This was not a full createdump build or a real process dump.
  • ./build.sh clr+libs+host -c Release: failed on a separate ARM64 macOS Helix worker because pkg-config was missing, before native compilation (failure log). End-to-end dump generation and LLDB unwinding have not been verified for this backport.

The original main PR separately reports a successful createdump build and real dump payload verification on an Apple M3 Pro; its LLDB unwinding check was blocked by an LLDB crash.

Risk

Low. The change adds optional metadata only on ARM64 macOS. Invalid or unavailable sysctl data is traced and leaves the existing dump format unchanged. The backport preserves the main PR's payload format, load-command accounting, and write ordering.

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

Note

This backport and PR description were prepared with GitHub Copilot assistance.

Manually port dotnet#138041 to the release branch createdump layout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1b5814e7-4d15-4dc0-9f24-8450d779af15
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 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.

@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.

@steveisok steveisok added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Dec 1, 2026
@steveisok

Copy link
Copy Markdown
Member

/ba-g Unrelated known issues

@steveisok
steveisok merged commit 11f0f5c into dotnet:release/11.0 Dec 1, 2026
120 of 125 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants