diff options
author | Kostya Serebryany <kcc@google.com> | 2014-04-21 10:28:13 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2014-04-21 10:28:13 +0000 |
commit | 84c70a70baa2c82b8768d3eecf37a61163cf8593 (patch) | |
tree | ab604d1a575a65aad40ac7d2014d5c9f76e7f295 /lib | |
parent | 1d16fdecd63c1e36802d04531f69b40b9a8e7e18 (diff) | |
download | llvm-84c70a70baa2c82b8768d3eecf37a61163cf8593.tar.gz llvm-84c70a70baa2c82b8768d3eecf37a61163cf8593.tar.bz2 llvm-84c70a70baa2c82b8768d3eecf37a61163cf8593.tar.xz |
[asan] temporary disable generating __asan_loadN/__asan_storeN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Instrumentation/AddressSanitizer.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index efb16d4b96..5194f759c6 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -613,14 +613,13 @@ void AddressSanitizer::instrumentMemIntrinsicParam(Instruction *OrigIns, if (Size->getType() != IntptrTy) Size = IRB.CreateIntCast(Size, IntptrTy, false); // Check the first byte. - instrumentAddress(OrigIns, InsertBefore, Addr, 8, IsWrite, Size, UseCalls); + instrumentAddress(OrigIns, InsertBefore, Addr, 8, IsWrite, Size, false); // Check the last byte. IRB.SetInsertPoint(InsertBefore); Value *SizeMinusOne = IRB.CreateSub(Size, ConstantInt::get(IntptrTy, 1)); Value *AddrLong = IRB.CreatePointerCast(Addr, IntptrTy); Value *AddrLast = IRB.CreateAdd(AddrLong, SizeMinusOne); - instrumentAddress(OrigIns, InsertBefore, AddrLast, 8, IsWrite, Size, - UseCalls); + instrumentAddress(OrigIns, InsertBefore, AddrLast, 8, IsWrite, Size, false); } // Instrument memset/memmove/memcpy @@ -768,8 +767,8 @@ void AddressSanitizer::instrumentMop(Instruction *I, bool UseCalls) { ConstantInt::get(IntptrTy, TypeSize / 8 - 1)), OrigPtrTy); Value *Size = ConstantInt::get(IntptrTy, TypeSize / 8); - instrumentAddress(I, I, Addr, 8, IsWrite, Size, UseCalls); - instrumentAddress(I, I, LastByte, 8, IsWrite, Size, UseCalls); + instrumentAddress(I, I, Addr, 8, IsWrite, Size, false); + instrumentAddress(I, I, LastByte, 8, IsWrite, Size, false); } // Validate the result of Module::getOrInsertFunction called for an interface @@ -825,12 +824,8 @@ void AddressSanitizer::instrumentAddress(Instruction *OrigIns, size_t AccessSizeIndex = TypeSizeToSizeIndex(TypeSize); if (UseCalls) { - if (SizeArgument) - IRB.CreateCall2(AsanMemoryAccessCallbackSized[IsWrite], AddrLong, - SizeArgument); - else - IRB.CreateCall(AsanMemoryAccessCallback[IsWrite][AccessSizeIndex], - AddrLong); + IRB.CreateCall(AsanMemoryAccessCallback[IsWrite][AccessSizeIndex], + AddrLong); return; } |