Skip to content

Haiku: Apply .NET-specific llvm-libunwind patches#126785

Open
trungnt2910 wants to merge 2 commits intodotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-libunwind
Open

Haiku: Apply .NET-specific llvm-libunwind patches#126785
trungnt2910 wants to merge 2 commits intodotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-libunwind

Conversation

@trungnt2910
Copy link
Copy Markdown
Contributor

.NET uses setRegister with 3 arguments, the last being a "location" for the register.

For calls without a known location, 0 is passed.

This updates the recent Haiku-specific call sites to setRegister to match what .NET uses.

Part of #55803.

.NET uses `setRegister` with 3 arguments, the last being a "location"
for the register.

For calls without a known location, `0` is passed.
Updated to include the patch at be5f98f
for Haiku-specific `llvm-libunwind` code.
Copilot AI review requested due to automatic review settings April 11, 2026 12:50
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 11, 2026
@trungnt2910
Copy link
Copy Markdown
Contributor Author

trungnt2910 commented Apr 11, 2026

As mentioned here: #55803 (comment)

If this PR is approved, could you please merge instead of squashing/rebasing to retain the hash of the reference?

Thanks!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the vendored llvm-libunwind Haiku x86_64 sigreturn unwinding path to use the 3-argument setRegister(reg, value, location) form that .NET expects (passing 0 when no register location is tracked), and records the additional upstream patch reference.

Changes:

  • Update Haiku x86_64 stepThroughSigReturn() to pass an explicit location argument (0) to all _registers.setRegister(...) calls.
  • Add the corresponding dotnet/runtime patch reference to llvm-libunwind-version.txt.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/native/external/llvm-libunwind/src/UnwindCursor.hpp Fix Haiku sigreturn register restoration call sites to match the 3-arg setRegister API usage (with location = 0).
src/native/external/llvm-libunwind-version.txt Document the additional applied .NET patch commit for the vendored libunwind.

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 NO-SQUASH The PR should not be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants