[compiler-rt] Reland: [ASan][Windows] Fix memmove/memcpy interception on x64 (#192060) (PR #193633)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 06:28:43 PDT 2026


================
@@ -807,7 +815,27 @@ struct Allocator {
       uptr memcpy_size = Min(new_size, m->UsedSize());
       // If realloc() races with free(), we may start copying freed memory.
       // However, we will report racy double-free later anyway.
+#if SANITIZER_WINDOWS64
+      // On Win64, REAL(memcpy) only points at a distinct non-interceptor
----------------
aganea wrote:

It looks like the issue first surfaced in https://github.com/llvm/llvm-project/issues/126077 with these versions:
```
OS: Microsoft Windows 11 Enterprise LTSC 24H2 10.0.26100
msvcrt.dll version: 7.0.26100.1882
vcruntime140.dll version: 14.42.34433.0
```
Mine is recent Windows and recent CRT:
```
Windows version 25H2 (OS Build 26200.8246)
C:\Windows\System32\vcruntime140.dll is at version 14.44.35211.0 (this is what is loaded in the ASan runtime)
C:\Windows\System32\msvcrt.dll is at version 7.0.26100.8246 (this is what is loaded in the ASan runtime)
```

https://github.com/llvm/llvm-project/pull/193633


More information about the llvm-commits mailing list