Skip to content

Use libunwind's unw_get_proc_info_in_range on macOS#126159

Open
am11 wants to merge 3 commits intodotnet:mainfrom
am11:patch-52
Open

Use libunwind's unw_get_proc_info_in_range on macOS#126159
am11 wants to merge 3 commits intodotnet:mainfrom
am11:patch-52

Conversation

@am11
Copy link
Member

@am11 am11 commented Mar 26, 2026

On macOS, we use the system-provided libunwind, which is effectively llvm-libunwind (with possible Apple-specific patches). This library does not expose remote unwind -specific APIs such as unw_get_proc_info_in_range().

However, for remote unwinding we rely on HP libunwind on macOS, and it’s used only by the cross-OS/arch createdump utility, which handles .NET crash dumps from any target/host OS combination. CMake’s feature introspection gets confused here because it reports capabilities from the OS libunwind used by the rest of CoreCLR rather than from the HP libunwind used in this path.

In this context we rely on explicit __APPLE__ checks because the CMake-detected capabilities don’t match the library this code actually uses. This was originally missed in #108250. Both implementations behave the same, and we’ll be able to drop the fallback once RHEL 9 (with HP libunwind 1.8) becomes the minimum baseline which is still years out.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 26, 2026
@am11 am11 requested a review from janvorli March 26, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-PAL-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant