[compiler-rt] [ASan][Windows] Fix memmove/memcpy interception on x64 (PR #192060)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 08:06:32 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,inc -- compiler-rt/lib/asan/asan_allocator.cpp compiler-rt/lib/asan/asan_win_static_runtime_thunk.cpp compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/asan/asan_allocator.cpp b/compiler-rt/lib/asan/asan_allocator.cpp
index d42282ad2..8cee66bdd 100644
--- a/compiler-rt/lib/asan/asan_allocator.cpp
+++ b/compiler-rt/lib/asan/asan_allocator.cpp
@@ -806,7 +806,8 @@ 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.
- // Avoid intercepted CRT memcpy/memmove (see sanitizer_allocator_combined.h).
+ // Avoid intercepted CRT memcpy/memmove (see
+ // sanitizer_allocator_combined.h).
internal_memcpy(new_ptr, old_ptr, memcpy_size);
Deallocate(old_ptr, 0, 0, stack, FROM_MALLOC);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/192060
More information about the llvm-commits
mailing list