mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
[asan] remove redundant ifndefs. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -105,10 +105,6 @@ static const char *const kAsanUnpoisonStackMemoryName =
|
|||||||
static const char *const kAsanOptionDetectUAR =
|
static const char *const kAsanOptionDetectUAR =
|
||||||
"__asan_option_detect_stack_use_after_return";
|
"__asan_option_detect_stack_use_after_return";
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
static const int kAsanStackAfterReturnMagic = 0xf5;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Accesses sizes are powers of two: 1, 2, 4, 8, 16.
|
// Accesses sizes are powers of two: 1, 2, 4, 8, 16.
|
||||||
static const size_t kNumberOfAccessSizes = 5;
|
static const size_t kNumberOfAccessSizes = 5;
|
||||||
|
|
||||||
@@ -1676,14 +1672,14 @@ void FunctionStackPoisoner::SetShadowToStackAfterReturnInlined(
|
|||||||
IRBuilder<> &IRB, Value *ShadowBase, int Size) {
|
IRBuilder<> &IRB, Value *ShadowBase, int Size) {
|
||||||
assert(!(Size % 8));
|
assert(!(Size % 8));
|
||||||
|
|
||||||
#ifndef NDEBUG
|
// kAsanStackAfterReturnMagic is 0xf5.
|
||||||
static_assert(kAsanStackAfterReturnMagic == 0xf5, "");
|
const uint64_t kAsanStackAfterReturnMagic64 = 0xf5f5f5f5f5f5f5f5ULL;
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 0; i < Size; i += 8) {
|
for (int i = 0; i < Size; i += 8) {
|
||||||
Value *p = IRB.CreateAdd(ShadowBase, ConstantInt::get(IntptrTy, i));
|
Value *p = IRB.CreateAdd(ShadowBase, ConstantInt::get(IntptrTy, i));
|
||||||
IRB.CreateStore(ConstantInt::get(IRB.getInt64Ty(), 0xf5f5f5f5f5f5f5f5ULL),
|
IRB.CreateStore(
|
||||||
IRB.CreateIntToPtr(p, IRB.getInt64Ty()->getPointerTo()));
|
ConstantInt::get(IRB.getInt64Ty(), kAsanStackAfterReturnMagic64),
|
||||||
|
IRB.CreateIntToPtr(p, IRB.getInt64Ty()->getPointerTo()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user