Issue |
126077
|
Summary |
[asan][win] memcpy is not alias for memmove with dynamic setup on latest Windows
|
Labels |
new issue
|
Assignees |
|
Reporter |
yingcong-wu
|
I have seen the following error on some of our internal test machines
```
Failed Tests (5):
AddressSanitizer-Unit :: ./Asan-x86_64-calls-Dynamic-Test.exe/AddressSanitizer/MemCpyOOBTest
AddressSanitizer-Unit :: ./Asan-x86_64-inline-Dynamic-Test.exe/AddressSanitizer/MemCpyOOBTest
AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/dll_intercept_memcpy_indirect.cpp
AddressSanitizer-x86_64-windows-dynamic :: TestCases/Windows/intercept_memcpy.cpp
AddressSanitizer-x86_64-windows-dynamic :: TestCases/memset_test.cpp
```
After some investigation, with the latest Windows setup(these failures only reproduced on those setup) and dynamic setup(the static test config does not have these failures),
```
#elif SANITIZER_WINDOWS64
#define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE 0
```
is not true anymore. The `memcpy` is not the alias for `memmove`, and we will have to intercept them both. However, simply changing this to `1` for Windows, although it can fix the failures for latest Windows, would bring huge regression for not-so-update-to-date Windows.
I have no further idea how to solve this problem, but I think this would affect more users with time after users update their OS and runtime. And I don't sure which part of the environment is causing this difference.
System information:
```
OS: Microsoft Windows 11 Enterprise LTSC 24H2 10.0.26100
msvcrt.dll version: 7.0.26100.1882
vcruntime140.dll version: 14.42.34433.0
```
I don't know if this information is enough, and I am happy to provide other information if needed.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs