[compiler-rt] 616b5ec - [compiler-rt][HWAsan} Add env prefixes in test

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 2 01:17:19 PDT 2025


Author: Aiden Grossman
Date: 2025-11-02T08:16:16Z
New Revision: 616b5ec4e461c9063ffbd9f9a520b741b6e97824

URL: https://github.com/llvm/llvm-project/commit/616b5ec4e461c9063ffbd9f9a520b741b6e97824
DIFF: https://github.com/llvm/llvm-project/commit/616b5ec4e461c9063ffbd9f9a520b741b6e97824.diff

LOG: [compiler-rt][HWAsan} Add env prefixes in test

This patch adds env prefixes to some environment variables that get set
inside a hwasan test. This broke when enabling the internal shell on
AArch64 and was not caught as I did not test precommit there.

Added: 
    

Modified: 
    compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c b/compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c
index 421d233957830..fc83b213561c8 100644
--- a/compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c
+++ b/compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c
@@ -3,17 +3,17 @@
 // Default compiler instrumentation works with any shadow base (dynamic or fixed).
 // RUN: %clang_hwasan %s -o %t
 // RUN: %run %t
-// RUN: HWASAN_OPTIONS=fixed_shadow_base=263878495698944 %run %t 2>%t.out || (cat %t.out | FileCheck %s)
-// RUN: HWASAN_OPTIONS=fixed_shadow_base=4398046511104 %run %t
+// RUN: env HWASAN_OPTIONS=fixed_shadow_base=263878495698944 %run %t 2>%t.out || (cat %t.out | FileCheck %s)
+// RUN: env HWASAN_OPTIONS=fixed_shadow_base=4398046511104 %run %t
 //
 // If -hwasan-mapping-offset is set, then the fixed_shadow_base needs to match.
 // RUN: %clang_hwasan %s -mllvm -hwasan-mapping-offset=263878495698944 -o %t
-// RUN: HWASAN_OPTIONS=fixed_shadow_base=263878495698944 %run %t 2>%t.out || (cat %t.out | FileCheck %s)
-// RUN: HWASAN_OPTIONS=fixed_shadow_base=4398046511104 not %run %t
+// RUN: env HWASAN_OPTIONS=fixed_shadow_base=263878495698944 %run %t 2>%t.out || (cat %t.out | FileCheck %s)
+// RUN: env HWASAN_OPTIONS=fixed_shadow_base=4398046511104 not %run %t
 
 // RUN: %clang_hwasan %s -mllvm -hwasan-mapping-offset=4398046511104 -o %t
-// RUN: HWASAN_OPTIONS=fixed_shadow_base=4398046511104 %run %t
-// RUN: HWASAN_OPTIONS=fixed_shadow_base=263878495698944 not %run %t
+// RUN: env HWASAN_OPTIONS=fixed_shadow_base=4398046511104 %run %t
+// RUN: env HWASAN_OPTIONS=fixed_shadow_base=263878495698944 not %run %t
 //
 // Note: if fixed_shadow_base is not set, compiler-rt will dynamically choose a
 // shadow base, which has a tiny but non-zero probability of matching the


        


More information about the llvm-commits mailing list