[PATCH] D22610: [compiler-rt] Fix memmove/memcpy overlap detection on windows

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 06:51:09 PDT 2016


rnk added inline comments.

================
Comment at: lib/asan/asan_interceptors.cc:433
@@ -432,3 +432,3 @@
 
 #define ASAN_MEMMOVE_IMPL(ctx, to, from, size) do {                            \
     if (UNLIKELY(!asan_inited))                                                \
----------------
Should we go back, intercept memmove instead of memcpy, and then initialize REAL(memset) to REAL(memmove) so that we don't crash when calling it?

Suppose the user calls memcpy or memmove on free memory. The stack trace can either contain __asam_memcpy or __asan_memmove. Which do you think is better?


https://reviews.llvm.org/D22610





More information about the llvm-commits mailing list