Skip to content

createdump: use 47-bit-valid SpecialDiagInfo address on arm64 macOS#130443

Merged
steveisok merged 1 commit into
dotnet:mainfrom
steveisok:fix-specialdiaginfo
Jul 10, 2026
Merged

createdump: use 47-bit-valid SpecialDiagInfo address on arm64 macOS#130443
steveisok merged 1 commit into
dotnet:mainfrom
steveisok:fix-specialdiaginfo

Conversation

@steveisok

Copy link
Copy Markdown
Member

Summary

Fixes the createdump (write) side of the SpecialDiagInfo issue addressed on the
reader side in dotnet/diagnostics#5823.

On Apple Silicon, the legacy macOS SpecialDiagInfo address 0x7fffffff10000000
is above the 47-bit user-space VM limit. createdump still writes a segment at
that address, but lldb's MachO core reader refuses to return reads above
0x7FFF_FFFFFFFF, so SOS reports:

Special diagnostics info read failed

and falls through to the slower managed-side path (or fails outright on older
builds without that fallback).

Change

src/coreclr/debug/createdump/specialdiaginfo.h now selects the address by arch
on macOS:

  • arm64 macOS0x00007ffffff10000 (47-bit valid; same address already
    used on Linux/other 64-bit)
  • x86_64 macOS0x7fffffff10000000 (legacy, unchanged)

All other platforms (Linux/other 64-bit, 32-bit) are unchanged.

The matching diagnostics reader (dotnet/diagnostics#5823) probes both the new
and legacy addresses, so dumps produced by older createdump binaries remain
readable — no regression.

Notes

  • SpecialThreadInfoAddress (0x7fffffff00000000) is intentionally left as-is;
    it's out of scope for this fix and lldb tolerates that region.

Note

This PR description was drafted with GitHub Copilot.

The legacy macOS SpecialDiagInfo address 0x7fffffff10000000 is above Apple
Silicon's 47-bit user-space VM limit, so lldb's MachO core reader refuses to
return the segment and SOS reports "Special diagnostics info read failed".

Write the segment at the 47-bit-valid 0x00007ffffff10000 on arm64 macOS
(the same address already used on Linux 64-bit) while keeping the legacy
address on x86_64 macOS. This is the createdump-side counterpart to
dotnet/diagnostics#5823, whose reader probes both the new and legacy
addresses so older dumps remain readable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f5c2b675-e04f-4544-8338-ab6dc4701d7f
@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.

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 adjusts the fixed virtual address used for the “SpecialDiagInfo” dump segment on Apple Silicon macOS so it stays within the 47-bit user-space address range accepted by lldb’s Mach-O core reader, while preserving the legacy address on x86_64 macOS.

Changes:

  • Use a 47-bit-valid SpecialDiagInfoAddress on macOS arm64 (0x00007ffffff10000).
  • Keep the legacy macOS x86_64 SpecialDiagInfoAddress unchanged (0x7fffffff10000000).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants