Skip to content

Commit d18b658

Browse files
committed
Reintroduce comment
1 parent b46d555 commit d18b658

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libunwind/src/DwarfParser.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,9 @@ bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
808808
results->savedRegisters[UNW_AARCH64_RA_SIGN_STATE].value ^ 0x3;
809809
results->setRegisterValue(UNW_AARCH64_RA_SIGN_STATE, value,
810810
initialState);
811+
// When using Feat_PAuthLR, the PC value needs to be captured so that
812+
// during unwinding, the correct PC value is used for re-authentication.
813+
// It is assumed that the CFI is placed before the signing instruction.
811814
results->ptrAuthDiversifier = fdeInfo.pcStart + codeOffset;
812815
_LIBUNWIND_TRACE_DWARF(
813816
"DW_CFA_AARCH64_negate_ra_state_with_pc(pc=0x%" PRIx64 ")\n",

0 commit comments

Comments
 (0)