[PATCH] D21509: [asan] fix false dynamic-stack-buffer-overflow report with constantly-sized dynamic allocas

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 14:32:28 PDT 2016


kubabrecka added inline comments.

================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:906
@@ -899,2 +905,3 @@
   bool IsInteresting =
+      isDynamicAlloca(AI) ||
       (AI.getAllocatedType()->isSized() &&
----------------
zaks.anna wrote:
> Why is this needed?
The change above makes `getAllocaSizeInBytes` valid only for static allocas (otherwise it asserts).  This avoids calling getAllocaSizeInBytes for dynamic allocas.


http://reviews.llvm.org/D21509





More information about the llvm-commits mailing list