Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use <sys/ucontext.h> instead of <ucontext.h> #110023

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

filipnavara
Copy link
Member

Apple's implementation of <ucontext.h> only works with the _XOPEN_SOURCE definition and contains some deprecated functions that .NET never really references. Let's ask the CI if using a more specific header is an option.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 20, 2024
#include <sys/ucontext.h>
#else
#include <ucontext.h>
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Please upstream this patch (https://github.com/libunwind/libunwind) and add a line next to

Apply https://github.com/libunwind/libunwind/pull/741

The next update (v1.9) will automatically pick it up from upstream, eliminating the need for manual verification on our end.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just CI test at this point. This should not even be used on Apple platforms but I think DAC references it for one reason or another. I'd rather resolve that and drop the change in libunwind.

Copy link
Member

Choose a reason for hiding this comment

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

Yup, windows and macOS only use HP libunwind for remote unwinding feature. It's a bit unfortunately that llvm-libunwind doesn't provide that and HP libunwind doesn't fully support macOS. Converging to one lib was attempted a few times but there isn't a substantial progress on that front. :(

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