[PATCH] Implement variable-sized alloca instrumentation (take 2).

Yury Gribov tetra2005 at gmail.com
Tue Jan 27 21:53:27 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1951
@@ -1921,4 +1950,3 @@
   // OldSize * ElementSize.
-  unsigned ElementSize = ASan.DL->getTypeAllocSize(AI->getAllocatedType());
-  Value *OldSize = IRB.CreateMul(AI->getArraySize(),
-                                 ConstantInt::get(IntptrTy, ElementSize));
+  int ElementSize = ASan.DL->getTypeAllocSize(AI->getAllocatedType());
+  Value *OldSize =
----------------
Why not unsigned btw?

http://reviews.llvm.org/D7098

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list