[llvm] r206741 - [asan] temporary disable generating __asan_loadN/__asan_storeN

Kostya Serebryany kcc at google.com
Mon Apr 21 03:28:14 PDT 2014


Author: kcc
Date: Mon Apr 21 05:28:13 2014
New Revision: 206741

URL: http://llvm.org/viewvc/llvm-project?rev=206741&view=rev
Log:
[asan] temporary disable generating __asan_loadN/__asan_storeN

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=206741&r1=206740&r2=206741&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Mon Apr 21 05:28:13 2014
@@ -613,14 +613,13 @@ void AddressSanitizer::instrumentMemIntr
   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(Ins
                     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
   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;
   }
 





More information about the llvm-commits mailing list