[ASan] Fix previous commit. Patch by Max Ostapenko!

llvm-svn: 238403
This commit is contained in:
Yury Gribov 2015-05-28 08:03:28 +00:00
parent 98b18599a6
commit 781bce2b94
1 changed files with 4 additions and 4 deletions

View File

@ -587,9 +587,9 @@ struct FunctionStackPoisoner : public InstVisitor<FunctionStackPoisoner> {
void unpoisonDynamicAllocasBeforeInst(Instruction *InstBefore,
Value *SavedStack) {
IRBuilder<> IRB(InstBefore);
IRB.CreateCall2(AsanAllocasUnpoisonFunc,
IRB.CreateLoad(DynamicAllocaLayout),
IRB.CreatePtrToInt(SavedStack, IntptrTy));
IRB.CreateCall(AsanAllocasUnpoisonFunc,
{IRB.CreateLoad(DynamicAllocaLayout),
IRB.CreatePtrToInt(SavedStack, IntptrTy)});
}
// Unpoison dynamic allocas redzones.
@ -1991,7 +1991,7 @@ void FunctionStackPoisoner::handleDynamicAllocaCall(AllocaInst *AI) {
ConstantInt::get(IntptrTy, Align));
// Insert __asan_alloca_poison call for new created alloca.
IRB.CreateCall2(AsanAllocaPoisonFunc, NewAddress, OldSize);
IRB.CreateCall(AsanAllocaPoisonFunc, {NewAddress, OldSize});
// Store the last alloca's address to DynamicAllocaLayout. We'll need this
// for unpoisoning stuff.