[compiler-rt] 3f738a4 - [Sanitizers][ABI] Remove too strong assert in asan_abi_shim (#81696)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 20:14:50 PST 2024
Author: Mariusz Borsa
Date: 2024-02-13T20:14:46-08:00
New Revision: 3f738a4c55dfb6476c47cab30e878cf5f0643351
URL: https://github.com/llvm/llvm-project/commit/3f738a4c55dfb6476c47cab30e878cf5f0643351
DIFF: https://github.com/llvm/llvm-project/commit/3f738a4c55dfb6476c47cab30e878cf5f0643351.diff
LOG: [Sanitizers][ABI] Remove too strong assert in asan_abi_shim (#81696)
Recently we enabled building the shim for arm64_32 arch. On this arch,
sizeof(uptr) == sizeof(unsigned long) == 4 - so this assert will fail in
runtime.
Need to just remove this assert
rdar://122927166
Co-authored-by: Mariusz Borsa <m_borsa at apple.com>
Added:
Modified:
compiler-rt/lib/asan_abi/asan_abi_shim.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan_abi/asan_abi_shim.cpp b/compiler-rt/lib/asan_abi/asan_abi_shim.cpp
index 35c45dff96f6d2..2512abc6412502 100644
--- a/compiler-rt/lib/asan_abi/asan_abi_shim.cpp
+++ b/compiler-rt/lib/asan_abi/asan_abi_shim.cpp
@@ -54,7 +54,7 @@ void *__asan_memmove(void *dest, const void *src, uptr n) {
// Functions concerning RTL startup and initialization
void __asan_init(void) {
- static_assert(sizeof(uptr) == 8);
+ static_assert(sizeof(uptr) == 8 || sizeof(uptr) == 4);
static_assert(sizeof(u64) == 8);
static_assert(sizeof(u32) == 4);
More information about the llvm-commits
mailing list