Skip to content

Commit bc27843

Browse files
Reapply "[compiler-rt][HWAsan] Remove CHECK lines from test" (#167038)
This reverts commit cc8478b. This was exposing existing failures due to the removal of the || clause in the run lines due to address space conflicts. Move the fixed base lower than the libraries will ever end up being to resolve the issue.
1 parent 913849e commit bc27843

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
// Default compiler instrumentation works with any shadow base (dynamic or fixed).
44
// RUN: %clang_hwasan %s -o %t
55
// RUN: %run %t
6-
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=263878495698944 %run %t 2>%t.out || (cat %t.out | FileCheck %s)
6+
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=17592186044416 %run %t
77
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=4398046511104 %run %t
88
//
99
// If -hwasan-mapping-offset is set, then the fixed_shadow_base needs to match.
10-
// RUN: %clang_hwasan %s -mllvm -hwasan-mapping-offset=263878495698944 -o %t
11-
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=263878495698944 %run %t 2>%t.out || (cat %t.out | FileCheck %s)
10+
// RUN: %clang_hwasan %s -mllvm -hwasan-mapping-offset=17592186044416 -o %t
11+
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=17592186044416 %run %t
1212
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=4398046511104 not %run %t
1313

1414
// RUN: %clang_hwasan %s -mllvm -hwasan-mapping-offset=4398046511104 -o %t
1515
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=4398046511104 %run %t
16-
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=263878495698944 not %run %t
16+
// RUN: env HWASAN_OPTIONS=fixed_shadow_base=17592186044416 not %run %t
1717
//
1818
// Note: if fixed_shadow_base is not set, compiler-rt will dynamically choose a
1919
// shadow base, which has a tiny but non-zero probability of matching the
@@ -26,8 +26,6 @@
2626
//
2727
// UNSUPPORTED: android
2828

29-
// CHECK: FATAL: HWAddressSanitizer: Shadow range {{.*}} is not available
30-
3129
#include <assert.h>
3230
#include <sanitizer/allocator_interface.h>
3331
#include <sanitizer/hwasan_interface.h>

0 commit comments

Comments
 (0)