summaryrefslogtreecommitdiff
path: root/lib/asan/asan_interceptors.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/asan_interceptors.cc')
-rw-r--r--lib/asan/asan_interceptors.cc23
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/asan/asan_interceptors.cc b/lib/asan/asan_interceptors.cc
index 1ef3a4df0..606016d4f 100644
--- a/lib/asan/asan_interceptors.cc
+++ b/lib/asan/asan_interceptors.cc
@@ -250,20 +250,10 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, void *)
ASAN_MEMMOVE_IMPL(ctx, to, from, size); \
} while (false)
-// At least on 10.7 and 10.8 both memcpy() and memmove() are being replaced
-// with WRAP(memcpy). As a result, false positives are reported for
-// memmove() calls. If we just disable error reporting with
-// ASAN_OPTIONS=replace_intrin=0, memmove() is still replaced with
-// internal_memcpy(), which may lead to crashes, see
-// http://llvm.org/bugs/show_bug.cgi?id=16362.
#define COMMON_INTERCEPTOR_MEMCPY_IMPL(ctx, to, from, size) \
do { \
ASAN_INTERCEPTOR_ENTER(ctx, memcpy); \
- if (PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE) { \
- ASAN_MEMCPY_IMPL(ctx, to, from, size); \
- } else { \
- ASAN_MEMMOVE_IMPL(ctx, to, from, size); \
- } \
+ ASAN_MEMCPY_IMPL(ctx, to, from, size); \
} while (false)
#define COMMON_INTERCEPTOR_MEMSET_IMPL(ctx, block, c, size) \
@@ -272,17 +262,6 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, void *)
ASAN_MEMSET_IMPL(ctx, block, c, size); \
} while (false)
-// In asan, REAL(memmove) is not used, but it is used in msan.
-#define COMMON_INTERCEPT_FUNCTION_MEMCPY() \
- do { \
- if (PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE) { \
- ASAN_INTERCEPT_FUNC(memcpy); \
- } else { \
- ASSIGN_REAL(memcpy, memmove); \
- } \
- CHECK(REAL(memcpy)); \
- } while (false)
-
#include "sanitizer_common/sanitizer_common_interceptors.inc"
// Syscall interceptors don't have contexts, we don't support suppressions