[libunwind] [libunwind][PAuthLR] Remove PC offset when using FEAT_PAuthLR (PR #164224)

Jack Styles via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 27 02:31:59 PDT 2025


================
@@ -808,12 +808,7 @@ bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
             results->savedRegisters[UNW_AARCH64_RA_SIGN_STATE].value ^ 0x3;
         results->setRegisterValue(UNW_AARCH64_RA_SIGN_STATE, value,
                                   initialState);
-        // When calculating the value of the PC, it is assumed that the CFI
-        // instruction is placed before the signing instruction, however it is
-        // placed after. Because of this, we need to take into account the CFI
-        // instruction is one instruction call later than expected, and reduce
-        // the PC value by 4 bytes to compensate.
-        results->ptrAuthDiversifier = fdeInfo.pcStart + codeOffset - 0x4;
+        results->ptrAuthDiversifier = fdeInfo.pcStart + codeOffset;
----------------
Stylie777 wrote:

Done

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


More information about the cfe-commits mailing list