[libcxx-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)
Daniil Kovalev via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 22 10:44:07 PDT 2025
kovdan01 wrote:
@ojhunt I closed all the threads which are no longer relevant or are duplicates. Now we have only 5 non-trivial and 3 trivial issues which really **need** to be resolved before merging the PR. All other enhancements could be done as follow-up patches.
I've created [pointer-authenticated-unwinding-2025-09-22-with-fixes](https://github.com/kovdan01/llvm-project/commits/pointer-authenticated-unwinding-2025-09-22-with-fixes/) in my fork containing fixes for all the non-trivial issues listed below. Commit links are provided in the list below and in corresponding threads.
Please let me know if you have any questions or any help is needed regarding this.
## To be done in scope of this PR
### Trivial formatting issues
These require almost zero effort to apply. Please consider fixing these first so we do not need to worry about them anymore.
1. https://github.com/llvm/llvm-project/pull/143230/files#r2369166326
2. https://github.com/llvm/llvm-project/pull/143230/files#r2369411804
3. https://github.com/llvm/llvm-project/pull/143230/files#r2369413223
### Non-trivial styling-related issues
1. Refactor preprocessor checks against ptrauth. See thread https://github.com/llvm/llvm-project/pull/143230/files#r2369029642 and commit 644405b56cfa59dd3787119182df087dff6e756c
2. Avoid use of `__ptrauth_restricted_intptr` which is not present in mainline. See thread https://github.com/llvm/llvm-project/pull/143230/files#r2369036612 and commit a2390e1e285023af78d27d768540bb8f30efea76. I do get the point that it's needed in downstream, but I suppose that it's better to avoid exposing downstream-specific stuff to mainline. I suppose that you can use a simple downstream patch over mainline libunwind which would resolve the build issue for you.
3. Do smth with `[[maybe_unused]]` attribute which only serves as a workaround for a spurious compiler bug. See thread https://github.com/llvm/llvm-project/pull/143230/files#r2368805350 and commit 4eaa8c7dff48bfc96b071ab0e219369839e3758c
### An issue causing a runtime crash
Do not mix pac-ret and ptrauth_returns. See thread https://github.com/llvm/llvm-project/pull/143230/files#r2369419226 and commit ced8b99373c9b0756f1718999996f44a74bdf46d.
### Other non-trivial issues
Verify FP is handled correctly https://github.com/llvm/llvm-project/pull/143230/files#r2369428305
## To be done as a follow-up
1. https://github.com/llvm/llvm-project/issues/96528#issuecomment-3320192622
2. https://github.com/llvm/llvm-project/issues/160101
3. https://github.com/llvm/llvm-project/issues/160110
4. https://github.com/llvm/llvm-project/issues/160114
5. https://github.com/llvm/llvm-project/issues/160117
6. https://github.com/llvm/llvm-project/issues/160119
7. https://github.com/llvm/llvm-project/issues/160120
https://github.com/llvm/llvm-project/pull/143230
More information about the libcxx-commits
mailing list