The memcpy and memmove functions are the same on windows.
The overlap detection logic is incorrect.
printf-1 test:
stdin>:2:114: note: possible intended match here ==877412==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x0000002bf2a8,0x0000002bf2ad) and [0x0000002bf2a9, 0x0000002bf2ae) overlap ``` ^
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?