[PATCH] D14377: [tsan] Allow memmove interceptor to be used when TSan is not initialized

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 06:04:22 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL252161: [tsan] Allow memmove interceptor to be used when TSan is not initialized (authored by kuba.brecka).

Changed prior to commit:
  http://reviews.llvm.org/D14377?vs=39335&id=39357#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14377

Files:
  compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc

Index: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
===================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
@@ -630,9 +630,11 @@
 }
 
 TSAN_INTERCEPTOR(void*, memmove, void *dst, void *src, uptr n) {
-  SCOPED_TSAN_INTERCEPTOR(memmove, dst, src, n);
-  MemoryAccessRange(thr, pc, (uptr)dst, n, true);
-  MemoryAccessRange(thr, pc, (uptr)src, n, false);
+  if (!COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED) {
+    SCOPED_TSAN_INTERCEPTOR(memmove, dst, src, n);
+    MemoryAccessRange(thr, pc, (uptr)dst, n, true);
+    MemoryAccessRange(thr, pc, (uptr)src, n, false);
+  }
   return REAL(memmove)(dst, src, n);
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14377.39357.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151105/53796c8f/attachment.bin>


More information about the llvm-commits mailing list