Skip to content

Move remote-unwind out of the PAL into createdump - #137188

Merged
jkotas merged 5 commits into
dotnet:mainfrom
am11:chore/remote-unwind-off-pal
Nov 10, 2026
Merged

jkotas merged 5 commits into
dotnet:mainfrom
am11:chore/remote-unwind-off-pal

Conversation

@am11

@am11 am11 commented Nov 9, 2026

Copy link
Copy Markdown
Member

No description provided.

@am11
am11 requested review from a team, AaronRobinsonMSFT and janvorli as code owners November 9, 2026 09:26
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 9, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@am11

am11 commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

cc @jkotas

Note that since HMF (LazyMachState::unwindLazyState) removal, PAL_VirtualUnwindOutOfProc is not used on windows and libunwind_xdac wasn't needed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The libunwind linkage changes require Linux and macOS dump-generation and stack-unwinding validation with bundled and system libunwind, including static single-file hosts, but that validation was unavailable in this review environment.

No open issues 🎉

What changed in this PR

Moves remote stack unwinding from CoreCLR’s Platform Abstraction Layer (PAL) into createdump, placing the implementation and its libunwind dependencies alongside the dump-generation code that uses them.

Changes:

  • Relocates remote-unwind functions and declarations into createdump and updates callers.
  • Moves libunwind feature checks and linking into the createdump build.
  • Removes obsolete PAL/DAC dependencies, Windows-hosted remote-unwind build support, and the bundled compact-unwind header.
File Description
src/​native/​external/​libunwind.cmake Removes Windows-hosted remote-unwind source selection.
src/​native/​external/​libunwind_extras/​configure.cmake Removes Windows compatibility configuration.
src/​native/​external/​libunwind_extras/​CMakeLists.txt Removes Windows-specific setup and the libunwind_xdac target.
src/​native/​corehost/​apphost/​static/​CMakeLists.txt Removes the coreclrpal_dac dependency.
src/​coreclr/​pal/​src/​exception/​compact_unwind_encoding.h Deletes the bundled header in favor of the Apple SDK header.
src/​coreclr/​pal/​src/​configure.cmake Removes remote-unwind feature checks from PAL configuration.
src/​coreclr/​pal/​src/​config.h.in Removes PAL remote-unwind feature macros.
src/​coreclr/​pal/​src/​CMakeLists.txt Removes the coreclrpal_dac library target.
src/​coreclr/​pal/​inc/​pal.h Removes remote-unwind declarations from the PAL interface.
src/​coreclr/​dlls/​mscordac/​mscordac_unixexports.src Removes remote-unwind exports.
src/​coreclr/​dlls/​mscordac/​CMakeLists.txt Removes remote-unwind library dependencies from DAC.
src/​coreclr/​debug/​createdump/​threadinfo.cpp Calls the relocated native-unwind function.
src/​coreclr/​debug/​createdump/​remoteunwind.cpp Adapts the relocated implementation to createdump.
src/​coreclr/​debug/​createdump/​createdump.h Declares remote-unwind functions and their memory callback.
src/​coreclr/​debug/​createdump/​crashinfounix.cpp Updates unwind-info calls and related diagnostics.
src/​coreclr/​debug/​createdump/​crashinfo.cpp Updates a comment to the relocated function’s name.
src/​coreclr/​debug/​createdump/​configure.cmake Adds remote-unwind capability checks.
src/​coreclr/​debug/​createdump/​config.h.in Adds remote-unwind feature macros.
src/​coreclr/​debug/​createdump/​CMakeLists.txt Compiles remote unwinding and configures libunwind dependencies directly.
src/​coreclr/​CMakeLists.txt Removes Windows-to-Unix libunwind subdirectory setup.
eng/​native/​tryrun.browser.cmake Removes unused remote-unwind cache entries.

Review effort: Balanced

am11 and others added 2 commits November 10, 2026 11:45
Only probe the system libunwind for unw_get_accessors and unw_get_proc_info_in_range; the bundled one, which createdump always uses on Apple, has both.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The platform-specific unwinder linkage and DAC export changes require Linux/macOS dump-generation and Windows cross-DAC compatibility validation that was not performed in this review.

No open issues 🎉

Review effort: Balanced

@jkotas

jkotas commented Nov 10, 2026

Copy link
Copy Markdown
Member

/ba-g dead letter

@jkotas
jkotas merged commit 50e0fb9 into dotnet:main Nov 10, 2026
155 of 157 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 11, 2026
@am11
am11 deleted the chore/remote-unwind-off-pal branch November 11, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Diagnostics-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.

4 participants