mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
[asan] workaround for PR16277: don't instrument AllocaInstr with alignment more than the redzone size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -451,7 +451,7 @@ struct FunctionStackPoisoner : public InstVisitor<FunctionStackPoisoner> {
|
||||
|
||||
StackAlignment = std::max(StackAlignment, AI.getAlignment());
|
||||
AllocaVec.push_back(&AI);
|
||||
uint64_t AlignedSize = getAlignedAllocaSize(&AI);
|
||||
uint64_t AlignedSize = getAlignedAllocaSize(&AI);
|
||||
TotalStackSize += AlignedSize;
|
||||
}
|
||||
|
||||
@@ -488,6 +488,7 @@ struct FunctionStackPoisoner : public InstVisitor<FunctionStackPoisoner> {
|
||||
bool isInterestingAlloca(AllocaInst &AI) {
|
||||
return (!AI.isArrayAllocation() &&
|
||||
AI.isStaticAlloca() &&
|
||||
AI.getAlignment() <= RedzoneSize() &&
|
||||
AI.getAllocatedType()->isSized());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user