[llvm] [BOLT][AArch64] Handle OpNegateRAState to enable optimizing binaries with pac-ret hardening (PR #120064)

Gergely Bálint via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 02:09:42 PDT 2025


bgergely0 wrote:

> > But now I realize that Stubs inserted in LongJmp are tricky, because two calls to the same target can share a Stub, but they might come from ranges with opposing RAStates, in which case the Stub's state is not clear.

> How would the current implementation handle this?
> Detect the inconsistent state and ignore the 2nd function (ie, the one that tried to reuse a stub that was in a wrong state) ?

Any sort of error-checking is only done based on the *input binary*, not what happens during optimizations.
Tbf this scenario is not very likely, and I'm not a 100% sure how that would affect unwinding.

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


More information about the llvm-commits mailing list