We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e36c96 commit 2a4f1f4Copy full SHA for 2a4f1f4
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
@@ -1271,6 +1271,9 @@ Value *HWAddressSanitizer::getFrameRecordInfo(IRBuilder<> &IRB) {
1271
// FP is 0xfffffffffffFFFF0 (4 lower bits are zero)
1272
// We only really need ~20 lower non-zero bits (FFFF), so we mix like this:
1273
// 0xFFFFPPPPPPPPPPPP
1274
+ //
1275
+ // FP works because in AArch64FrameLowering::getFrameIndexReference, we
1276
+ // prefer FP-relative offsets for functions compiled with HWASan.
1277
FP = IRB.CreateShl(FP, 44);
1278
return IRB.CreateOr(PC, FP);
1279
}
0 commit comments