[PATCH] D19168: [esan] EfficiencySanitizer base runtime library

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 15:37:51 PDT 2016


aizatsky added inline comments.

================
Comment at: cmake/config-ix.cmake:633
@@ +632,3 @@
+
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND CFI_SUPPORTED_ARCH AND
+    OS_NAME MATCHES "Linux")
----------------
is CFI_SUPPORTED_ARCH expected here?

================
Comment at: lib/esan/esan.cc:84
@@ +83,3 @@
+  parser.ParseString(GetEnv(kEsanOpsEnv));
+  SetVerbosity(common_flags()->verbosity);
+  if (Verbosity())
----------------
replace by a call to InitializeCommonFlags (sanitizer_flags.h)

================
Comment at: lib/esan/esan_interface.cc:25
@@ +24,3 @@
+
+// TODO(bruening): put all of these in a header to ensure inlining -- though
+// we expect calling these to be rare as our instrumentation-inlined fastpath
----------------
I'm not sure if it will help with inlining because you add calls during instrumentation.

================
Comment at: lib/esan/esan_interface.cc:47
@@ +46,3 @@
+  processMemAccess(CALLERPC, (uptr)Addr, kSizeLog8, false);
+  processMemAccess(CALLERPC, (uptr)Addr + 8, kSizeLog8, false);
+}
----------------
any special reason why not kSizeLog16?

================
Comment at: lib/esan/esan_interface.h:37
@@ +36,3 @@
+
+SANITIZER_INTERFACE_ATTRIBUTE void __esan_aligned_read1(void *Addr);
+SANITIZER_INTERFACE_ATTRIBUTE void __esan_aligned_read2(void *Addr);
----------------
Is there a reason why you have lots of _N functions instead of

__esan_aligned_write(void* Addr, size_t sizeLog)?

Each one of these makes this kind of call anyway.


http://reviews.llvm.org/D19168





More information about the llvm-commits mailing list