@@ -348,7 +348,7 @@ class HWAddressSanitizer {
348
348
void instrumentGlobals ();
349
349
350
350
Value *getPC (IRBuilder<> &IRB);
351
- Value *getSP (IRBuilder<> &IRB);
351
+ Value *getFP (IRBuilder<> &IRB);
352
352
Value *getFrameRecordInfo (IRBuilder<> &IRB);
353
353
354
354
void instrumentPersonalityFunctions ();
@@ -1148,7 +1148,7 @@ Value *HWAddressSanitizer::getStackBaseTag(IRBuilder<> &IRB) {
1148
1148
// Extract some entropy from the stack pointer for the tags.
1149
1149
// Take bits 20..28 (ASLR entropy) and xor with bits 0..8 (these differ
1150
1150
// between functions).
1151
- Value *StackPointerLong = getSP (IRB);
1151
+ Value *StackPointerLong = getFP (IRB);
1152
1152
Value *StackTag =
1153
1153
applyTagMask (IRB, IRB.CreateXor (StackPointerLong,
1154
1154
IRB.CreateLShr (StackPointerLong, 20 )));
@@ -1165,7 +1165,7 @@ Value *HWAddressSanitizer::getAllocaTag(IRBuilder<> &IRB, Value *StackTag,
1165
1165
}
1166
1166
1167
1167
Value *HWAddressSanitizer::getUARTag (IRBuilder<> &IRB) {
1168
- Value *StackPointerLong = getSP (IRB);
1168
+ Value *StackPointerLong = getFP (IRB);
1169
1169
Value *UARTag =
1170
1170
applyTagMask (IRB, IRB.CreateLShr (StackPointerLong, PointerTagShift));
1171
1171
@@ -1232,7 +1232,7 @@ Value *HWAddressSanitizer::getPC(IRBuilder<> &IRB) {
1232
1232
return IRB.CreatePtrToInt (IRB.GetInsertBlock ()->getParent (), IntptrTy);
1233
1233
}
1234
1234
1235
- Value *HWAddressSanitizer::getSP (IRBuilder<> &IRB) {
1235
+ Value *HWAddressSanitizer::getFP (IRBuilder<> &IRB) {
1236
1236
if (!CachedSP) {
1237
1237
// FIXME: use addressofreturnaddress (but implement it in aarch64 backend
1238
1238
// first).
@@ -1251,7 +1251,7 @@ Value *HWAddressSanitizer::getSP(IRBuilder<> &IRB) {
1251
1251
Value *HWAddressSanitizer::getFrameRecordInfo (IRBuilder<> &IRB) {
1252
1252
// Prepare ring buffer data.
1253
1253
Value *PC = getPC (IRB);
1254
- Value *SP = getSP (IRB);
1254
+ Value *SP = getFP (IRB);
1255
1255
1256
1256
// Mix SP and PC.
1257
1257
// Assumptions:
0 commit comments