Skip to content

Use libunwind's unw_get_proc_info_in_range on macOS#126159

Merged
janvorli merged 1 commit intodotnet:mainfrom
am11:patch-52
Apr 24, 2026
Merged

Use libunwind's unw_get_proc_info_in_range on macOS#126159
janvorli merged 1 commit intodotnet:mainfrom
am11:patch-52

Conversation

@am11
Copy link
Copy Markdown
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.

@am11
Copy link
Copy Markdown
Member Author

am11 commented Apr 23, 2026

@janvorli, could you please take a look?

Copy link
Copy Markdown
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@janvorli janvorli merged commit fa3ead2 into dotnet:main Apr 24, 2026
107 of 109 checks passed
@am11 am11 deleted the patch-52 branch April 24, 2026 15:30
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.

2 participants