[compiler-rt] [asan][hwasan] Add config for AArch64 Linux with 39-bit VA. (PR #166881)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 18:08:32 PST 2025


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 h -- compiler-rt/lib/asan/asan_allocator.h compiler-rt/lib/hwasan/hwasan_allocator.h --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.h b/compiler-rt/lib/asan/asan_allocator.h
index e2ec87769..779813724 100644
--- a/compiler-rt/lib/asan/asan_allocator.h
+++ b/compiler-rt/lib/asan/asan_allocator.h
@@ -200,7 +200,8 @@ const uptr kAllocatorSpace = ~(uptr)0;
 #    if defined(__powerpc64__)
 const uptr kAllocatorSize  =  0x20000000000ULL;  // 2T.
 typedef DefaultSizeClassMap SizeClassMap;
-#    elif defined(__aarch64__) && (SANITIZER_ANDROID || defined(SANITIZER_AARCH64_39BIT_VA))
+#    elif defined(__aarch64__) && \
+        (SANITIZER_ANDROID || defined(SANITIZER_AARCH64_39BIT_VA))
 // Android needs to support 39, 42 and 48 bit VMA.
 const uptr kAllocatorSize  =  0x2000000000ULL;  // 128G.
 typedef VeryCompactSizeClassMap SizeClassMap;
diff --git a/compiler-rt/lib/hwasan/hwasan_allocator.h b/compiler-rt/lib/hwasan/hwasan_allocator.h
index 94fd7b2f7..b539e446a 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

``````````

</details>


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


More information about the llvm-commits mailing list