[PATCH] D22232: [asan] Fix unittest Asan-x86_64-inline-Test crashing on Windows64

Wang Wei via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 12:34:01 PDT 2016


wang0109 updated this revision to Diff 63553.
wang0109 added a comment.

- update diff: rewrite comment


http://reviews.llvm.org/D22232

Files:
  lib/asan/asan_interceptors.cc

Index: lib/asan/asan_interceptors.cc
===================================================================
--- lib/asan/asan_interceptors.cc
+++ lib/asan/asan_interceptors.cc
@@ -725,11 +725,13 @@
   InitializeCommonInterceptors();
 
   // Intercept mem* functions.
-  ASAN_INTERCEPT_FUNC(memmove);
+  ASAN_INTERCEPT_FUNC(memcpy);
   ASAN_INTERCEPT_FUNC(memset);
   if (PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE) {
-    ASAN_INTERCEPT_FUNC(memcpy);
+    // In asan, REAL(memmove) is not used, but it is used in msan.
+    ASAN_INTERCEPT_FUNC(memmove);
   }
+  CHECK(REAL(memcopy));
 
   // Intercept str* functions.
   ASAN_INTERCEPT_FUNC(strcat);  // NOLINT


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22232.63553.patch
Type: text/x-patch
Size: 657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160711/593b3cf1/attachment.bin>


More information about the llvm-commits mailing list