Skip to content

Commit e609aa1

Browse files
committed
Fix platform specific checks
1 parent da65310 commit e609aa1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ using namespace __asan;
7171
// See http://llvm.org/bugs/show_bug.cgi?id=11763.
7272
#define ASAN_MEMCPY_IMPL(ctx, to, from, size) \
7373
do { \
74-
if (!ShouldReplaceIntrinsic(IS_NTDLL_CALLEE, to, size, from)) { \
74+
if (SANITIZER_WINDOWS64 && \
75+
!ShouldReplaceIntrinsic(IS_NTDLL_CALLEE, to, size, from)) { \
7576
return REAL(memcpy)(to, from, size); \
7677
} \
7778
if (LIKELY(replace_intrin_cached)) { \
@@ -89,7 +90,8 @@ using namespace __asan;
8990
// memset is called inside Printf.
9091
#define ASAN_MEMSET_IMPL(ctx, block, c, size) \
9192
do { \
92-
if (!ShouldReplaceIntrinsic(IS_NTDLL_CALLEE, block, size)) { \
93+
if (SANITIZER_WINDOWS64 && \
94+
!ShouldReplaceIntrinsic(IS_NTDLL_CALLEE, block, size)) { \
9395
return REAL(memset)(block, c, size); \
9496
} \
9597
if (LIKELY(replace_intrin_cached)) { \
@@ -102,7 +104,8 @@ using namespace __asan;
102104

103105
#define ASAN_MEMMOVE_IMPL(ctx, to, from, size) \
104106
do { \
105-
if (!ShouldReplaceIntrinsic(IS_NTDLL_CALLEE, to, size, from)) { \
107+
if (SANITIZER_WINDOWS64 && \
108+
!ShouldReplaceIntrinsic(IS_NTDLL_CALLEE, to, size, from)) { \
106109
return internal_memmove(to, from, size); \
107110
} \
108111
if (LIKELY(replace_intrin_cached)) { \

0 commit comments

Comments
 (0)