[compiler-rt] [hwasan] Add config for AArch64 Linux with 39-bit VA. (PR #170927)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 5 13:45:53 PST 2025
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/170927
>From c7d0025518d08b7c2543b3c8528a29ac8292f852 Mon Sep 17 00:00:00 2001
From: Eli Friedman <efriedma at qti.qualcomm.com>
Date: Fri, 5 Dec 2025 13:37:52 -0800
Subject: [PATCH 1/2] [hwasan] Add config for AArch64 Linux with 39-bit VA.
This is leveraging work which has already been done for Android, which
ships 39-bit VA kernels, and extending it to other embedded Linux
targets.
(SANITIZER_AARCH64_39BIT_VA was added in 58c8f57681.)
---
compiler-rt/lib/hwasan/hwasan_allocator.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.h b/compiler-rt/lib/hwasan/hwasan_allocator.h
index 2ada2a0b1851a..94fd7b2f7467b 100644
--- a/compiler-rt/lib/hwasan/hwasan_allocator.h
+++ b/compiler-rt/lib/hwasan/hwasan_allocator.h
@@ -74,7 +74,7 @@ struct AP64 {
#if defined(HWASAN_ALIASING_MODE)
static const uptr kSpaceSize = 1ULL << kAddressTagShift;
typedef __sanitizer::DefaultSizeClassMap SizeClassMap;
-#elif SANITIZER_LINUX && !SANITIZER_ANDROID
+#elif SANITIZER_LINUX && !SANITIZER_ANDROID && !defined(SANITIZER_AARCH64_39BIT_VA)
static const uptr kSpaceSize = 0x40000000000ULL; // 4T.
typedef __sanitizer::DefaultSizeClassMap SizeClassMap;
#else
>From e10b32963ec16633d757b9cafaf3b033a1deab85 Mon Sep 17 00:00:00 2001
From: Eli Friedman <efriedma at qti.qualcomm.com>
Date: Fri, 5 Dec 2025 13:45:33 -0800
Subject: [PATCH 2/2] Fix formatting.
---
compiler-rt/lib/hwasan/hwasan_allocator.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.h b/compiler-rt/lib/hwasan/hwasan_allocator.h
index 94fd7b2f7467b..b539e446a07bb 100644
--- a/compiler-rt/lib/hwasan/hwasan_allocator.h
+++ b/compiler-rt/lib/hwasan/hwasan_allocator.h
@@ -74,7 +74,8 @@ struct AP64 {
#if defined(HWASAN_ALIASING_MODE)
static const uptr kSpaceSize = 1ULL << kAddressTagShift;
typedef __sanitizer::DefaultSizeClassMap SizeClassMap;
-#elif SANITIZER_LINUX && !SANITIZER_ANDROID && !defined(SANITIZER_AARCH64_39BIT_VA)
+#elif SANITIZER_LINUX && !SANITIZER_ANDROID && \
+ !defined(SANITIZER_AARCH64_39BIT_VA)
static const uptr kSpaceSize = 0x40000000000ULL; // 4T.
typedef __sanitizer::DefaultSizeClassMap SizeClassMap;
#else
More information about the llvm-commits
mailing list