[PATCH] D27052: [compiler-rt][asan] Fix overlaping parameters for memmove/memcpy on windows.
Etienne Bergeron via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 08:32:56 PST 2016
etienneb added inline comments.
================
Comment at: lib/asan/asan_interceptors.cc:423
void *__asan_memcpy(void *to, const void *from, uptr size) {
+#if PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE
ASAN_MEMCPY_IMPL(nullptr, to, from, size);
----------------
This line seems incorrect for iOS.
We should never use 'PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE' within a "#if/def" and only a "if" statement.
```
// Platform-specific options.
#if SANITIZER_MAC
bool PlatformHasDifferentMemcpyAndMemmove();
# define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE \
(PlatformHasDifferentMemcpyAndMemmove())
#elif SANITIZER_WINDOWS64
# define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE false
#else
# define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE true
#endif // SANITIZER_MAC
```
https://reviews.llvm.org/D27052
More information about the llvm-commits
mailing list