[libcxx-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

Oliver Hunt via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 14 14:33:22 PDT 2025


ojhunt wrote:

> @ojhunt Thanks for addressing the issues!
> 
> I've run tests on our side and I only see 2 issues at this point, and both of them seem to be fixed trivially. See my branch https://github.com/kovdan01/llvm-project/commits/pointer-authenticated-unwinding-fix-2025-10-14/
> 
> 1. You use `ptrauth_function_pointer_type_discriminator` in UnwindLevel1.c, but it looks like this is not defined anywhere, which causes compile error. Please add a definition or just use `ptrauth_type_discriminator`. For my local tests, I've switched to `ptrauth_type_discriminator` to avoid compiler error - see commit [kovdan01 at 7a43f48](https://github.com/kovdan01/llvm-project/commit/7a43f48bdac2bba68fc9f392361b44d586ca06d9)

Indeed you're correct - I've created https://github.com/llvm/llvm-project/pull/163456

> 2. In `get_handler_function`, you assume that function pointer is signed with type discrimination enabled. This is not necessarily true, for example, this is not included in pauthtest ABI. Please add a corresponding check against `#if __has_feature(ptrauth_function_pointer_type_discrimination)` - see commit [kovdan01 at 57c4673](https://github.com/kovdan01/llvm-project/commit/57c46737ba26b28010443b66ea24e1a3dc6e9890)
> 

`ptrauth_function_pointer_type_discriminator` does the correct thing here - that's why it exists :D

> When these issues are resolved, this PR LGTM.



https://github.com/llvm/llvm-project/pull/143230


More information about the libcxx-commits mailing list