Use libunwind's unw_get_proc_info_in_range on macOS#126159
Open
am11 wants to merge 3 commits intodotnet:mainfrom
Open
Use libunwind's unw_get_proc_info_in_range on macOS#126159am11 wants to merge 3 commits intodotnet:mainfrom
am11 wants to merge 3 commits intodotnet:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
createdumputility, 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.