[compiler-rt] [libcxx] [llvm] compiler-rt: Introduce runtime functions for emulated PAC. (PR #133530)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 10 06:04:40 PDT 2025


mstorsjo wrote:

> If I get the log posted by @pawosm-arm right, this test case should crash but it doesn't:
> 
> ```c
>   case 3: {
>     // Test that a corrupted signature crashes the program.
>     uint64_t signed_ptr = __emupac_pacda(ptr1, ptr2);
>     __emupac_autda(signed_ptr + (1ULL << 48), ptr2);
>     break;
>   }
> ```
> 
> I guess the reason is that the CPU supports `FEAT_PAuth` (thus actual `autda` instruction is executed instead of the software emulation), but not `FEAT_FPAC` (so that `__emupac_autda` simply returns a corrupted pointer, which is never dereferenced). @pawosm-arm on what CPU model do you run the tests?

Not sure about that case, but my case on Windows above also seems to error on running case 3. That is running on the free github actions runners, which AFAIK run "Azure Cobalt 100" processors, which are Neoverse N2 based. The feature detection on Windows might not set all the same feature flags as the feature detection on Linux though.

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


More information about the llvm-commits mailing list