[PATCH] D41602: [hwasan] Stack instrumentation.

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 12:28:23 PST 2018


kcc accepted this revision.
kcc added a comment.

LGTM with two nits, feel free to address them separately.



================
Comment at: compiler-rt/test/hwasan/TestCases/stack-oob.cc:1
+// RUN: %clangxx_hwasan -DSIZE=64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_hwasan -DSIZE=0x1000 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
----------------
I'd add more sizes here. 


================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:355
+    //   IRB.CreateStore(JustTag, IRB.CreateConstGEP1_32(ShadowPtr, i));
+    IRB.CreateMemSet(ShadowPtr, JustTag, ShadowSize, /*Align=*/1);
+  }
----------------
Will this work if 
  * the size is large and memset doesn't get inlined
  * hwasan has the msan interceptor
? 


https://reviews.llvm.org/D41602





More information about the llvm-commits mailing list