-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Track upstreaming llvm-libunwind patches #72655
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @hoyosjs Issue DetailsWe have made several llvm libunwind patches for NativeAOT, since its initial bring up: dotnet/corert#2293. The collective patches are in the following two commits on top of upstream's latest version (as of this moment) 14.0.6 release: runtime/src/native/external/llvm-libunwind-version.txt Lines 4 to 5 in 44be09d
It would be great (on multiple fronts) if we upstream those patches via LLVM code review platform of choice; Phabricator (https://llvm.org/docs/Phabricator.html). It will require some additional work for other architectures which llvm-libunwind supports (such as s390x and RISCV), to make them ready to upstream. At the moment, it is relatively easier to upstream patches since we are on the latest release.
|
Author: | am11 |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
cc @janvorli |
@am11 thank you for creating this tracking issue. Regarding the unw_get_save_loc and register locations, I believe we don't generate any unwind instructions that would save / restore managed references in registers to / from other registers and I don't see us needing such functionality. So adding that would be mostly just for completeness of the implementation. |
An update; LLVM has recently switched from Phabricator to GitHub Pull Requests model, which makes it much convenient to upstream the local patches. |
We have made several llvm libunwind patches for NativeAOT, since its initial bring up: dotnet/corert#2293. The collective patches are in the following two commits on top of upstream's latest version (as of this moment) 14.0.6 release:
runtime/src/native/external/llvm-libunwind-version.txt
Lines 4 to 5 in 44be09d
It would be great (on multiple fronts) if we upstream those patches via LLVM code review platform of choice; Phabricator (https://llvm.org/docs/Phabricator.html). It will require some additional work for other architectures which llvm-libunwind supports (such as s390x and RISCV), to make them ready to upstream. At the moment, it is relatively easier to upstream patches since we are on the latest release.
unw_get_save_loc
APIOne of the key additions in our local patches is the implementation of
unw_get_save_loc
, which was scoped to memory locations, but does not cover register locations. The original commit was dotnet/corert@c6571c6 and v14.0.6 state can be extracted from e571945.Moreover,
unw_get_save_loc
is the API which we test in coreclr PAL introspection code (src/coreclr/pal/src/configure.cmake
), and based on which we decide whether to use the pinning fallback in GC. If the memory-location-only patch gets upstreamed (without first implementing register locations support), we would probably need to improve our introspection to detect the exact capability we need out of this API for GC; currently HP libunwind (the recommended variant for coreclr PAL) has support for both memory and registers location, which eventually gives us granular control over object lifetime in the GC.The text was updated successfully, but these errors were encountered: