[compiler-rt] [asan] Fix Windows i386 regression (PR #73650)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 08:13:12 PST 2023


https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/73650

>From ef73a45b0c3eb91415916fbc2b6b01d1d2583f7c Mon Sep 17 00:00:00 2001
From: Farzon Lotfi <1802579+farzonl at users.noreply.github.com>
Date: Tue, 28 Nov 2023 09:13:22 -0500
Subject: [PATCH] [asan] Fix Windows i386 regression

This change makes x64 enablement case explicit and
adds an else case for 32bit which fixes a regression
on Windows i386 asan builds introduced
by https://github.com/llvm/llvm-project/pull/66973t/pull/66973.
---
 compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
index 49d8a67cc12db3f..5965281555059c5 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h
@@ -263,9 +263,12 @@
 #if SANITIZER_WINDOWS64 && SANITIZER_ARM64
 #  define SANITIZER_WINDOWS_ARM64 1
 #  define SANITIZER_WINDOWS_x64 0
-#else
+#elif SANITIZER_WINDOWS64 && !SANITIZER_ARM64
 #  define SANITIZER_WINDOWS_ARM64 0
 #  define SANITIZER_WINDOWS_x64 1
+#else
+#  define SANITIZER_WINDOWS_ARM64 0
+#  define SANITIZER_WINDOWS_x64 0
 #endif
 
 #if SANITIZER_SOLARIS && SANITIZER_WORDSIZE == 32



More information about the llvm-commits mailing list