Index: compiler-rt/lib/asan/tests/asan_asm_test.cc =================================================================== --- compiler-rt/lib/asan/tests/asan_asm_test.cc +++ compiler-rt/lib/asan/tests/asan_asm_test.cc @@ -12,7 +12,8 @@ //===----------------------------------------------------------------------===// #include "asan_test_utils.h" -#if defined(__linux__) +#if defined(__linux__) && \ + (!defined(ASAN_SHADOW_SCALE) || ASAN_SHADOW_SCALE == 3) // Assembly instrumentation is broken on x86 Android (x86 + PIC + shared runtime // library). See https://github.com/google/sanitizers/issues/353 Index: compiler-rt/lib/asan/tests/asan_interface_test.cc =================================================================== --- compiler-rt/lib/asan/tests/asan_interface_test.cc +++ compiler-rt/lib/asan/tests/asan_interface_test.cc @@ -153,14 +153,15 @@ __asan_set_death_callback(NULL); } -static const char* kUseAfterPoisonErrorMessage = "use-after-poison"; - #define GOOD_ACCESS(ptr, offset) \ EXPECT_FALSE(__asan_address_is_poisoned(ptr + offset)) #define BAD_ACCESS(ptr, offset) \ EXPECT_TRUE(__asan_address_is_poisoned(ptr + offset)) +#if !defined(ASAN_SHADOW_SCALE) || ASAN_SHADOW_SCALE == 3 +static const char* kUseAfterPoisonErrorMessage = "use-after-poison"; + TEST(AddressSanitizerInterface, SimplePoisonMemoryRegionTest) { char *array = Ident((char*)malloc(120)); // poison array[40..80) @@ -199,6 +200,7 @@ BAD_ACCESS(array, 96); free(array); } +#endif TEST(AddressSanitizerInterface, PushAndPopWithPoisoningTest) { // Vector of capacity 20 @@ -219,6 +221,7 @@ free(vec); } +#if !defined(ASAN_SHADOW_SCALE) || ASAN_SHADOW_SCALE == 3 // Make sure that each aligned block of size "2^granularity" doesn't have // "true" value before "false" value. static void MakeShadowValid(bool *shadow, int length, int granularity) { @@ -272,6 +275,7 @@ } free(arr); } +#endif TEST(AddressSanitizerInterface, GlobalRedzones) { GOOD_ACCESS(glob1, 1 - 1); Index: compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cc +++ compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cc @@ -31,7 +31,7 @@ // ASan shadow memory on s390 is too large for this test. // AArch64 bots fail on this test. // TODO(alekseys): Android lit do not run ulimit on device. -// UNSUPPORTED: s390,android,arm,aarch64 +// UNSUPPORTED: s390,android,arm,aarch64,custom-shadow-scale #include #include Index: compiler-rt/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc +++ compiler-rt/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc @@ -15,6 +15,7 @@ // CHECK-nounwind: READ of size 4 // CHECK-nounwind-NEXT: {{#0 0x[0-9a-fA-F]+ in foo}} +// UNSUPPORTED: custom-shadow-scale __attribute__((noinline)) int foo(size_t n, int *buffer) { int r; __asm__("movl (%[buffer], %[n], 4), %[r] \n\t" Index: compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc +++ compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc @@ -11,6 +11,7 @@ // GNU driver doesn't handle .so files properly. // REQUIRES: x86_64-target-arch, Clang +// UNSUPPORTED: custom-shadow-scale #if BUILD_SO int G; int *getG() { Index: compiler-rt/test/asan/TestCases/Linux/cuda_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/cuda_test.cc +++ compiler-rt/test/asan/TestCases/Linux/cuda_test.cc @@ -2,6 +2,7 @@ // that mmaps memory inside the asan's shadow gap. // // REQUIRES: x86_64-target-arch +// UNSUPPORTED: custom-shadow-scale // // RUN: %clangxx_asan %s -o %t // RUN: not %env_asan_opts=protect_shadow_gap=1 %t 2>&1 | FileCheck %s --check-prefix=CHECK-PROTECT1 @@ -33,5 +34,3 @@ *(char*)(Base + 1234) = 1; // CHECK-PROTECT0: AddressSanitizer: use-after-poison on address 0x0002000004d2 } - - Index: compiler-rt/test/asan/TestCases/Linux/kernel-area.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/kernel-area.cc +++ compiler-rt/test/asan/TestCases/Linux/kernel-area.cc @@ -17,8 +17,8 @@ // CHECK-kernel-64-bits: || `[0x24{{0+}}, 0x27{{f+}}]` || ShadowGap || // // REQUIRES: i386-target-arch +// UNSUPPORTED: custom-shadow-scale int main() { return 0; } - Index: compiler-rt/test/asan/TestCases/Linux/nohugepage_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/nohugepage_test.cc +++ compiler-rt/test/asan/TestCases/Linux/nohugepage_test.cc @@ -10,6 +10,7 @@ // the result will depend on the OS version and settings... // // REQUIRES: x86_64-target-arch +// UNSUPPORTED: custom-shadow-scale // // WARNING: this test is very subtle and may nto work on some systems. // If this is the case we'll need to futher improve it or disable it. Index: compiler-rt/test/asan/TestCases/intra-object-overflow.cc =================================================================== --- compiler-rt/test/asan/TestCases/intra-object-overflow.cc +++ compiler-rt/test/asan/TestCases/intra-object-overflow.cc @@ -5,7 +5,7 @@ // FIXME: fix 32-bits. // REQUIRES: asan-64-bits // FIXME: Implement ASan intra-object padding in Clang's MS record layout -// UNSUPPORTED: win32 +// UNSUPPORTED: win32, custom-shadow-scale #include #include class Foo { Index: compiler-rt/test/asan/TestCases/small_memcpy_test.cc =================================================================== --- compiler-rt/test/asan/TestCases/small_memcpy_test.cc +++ compiler-rt/test/asan/TestCases/small_memcpy_test.cc @@ -7,6 +7,7 @@ // RUN: not %run %t 32 48 2>&1 | FileCheck %s --check-prefix=CHECK // RUN: not %run %t 40 56 2>&1 | FileCheck %s --check-prefix=CHECK // RUN: not %run %t 48 64 2>&1 | FileCheck %s --check-prefix=CHECK +// UNSUPPORTED: custom-shadow-scale #include #include #include Index: compiler-rt/test/asan/TestCases/stack-buffer-overflow-with-position.cc =================================================================== --- compiler-rt/test/asan/TestCases/stack-buffer-overflow-with-position.cc +++ compiler-rt/test/asan/TestCases/stack-buffer-overflow-with-position.cc @@ -42,3 +42,4 @@ // CHECK-63: 'CCC'{{.*}} <== {{.*}}partially underflows this variable // CHECK-73: 'CCC'{{.*}} <== {{.*}}partially overflows this variable // CHECK-74: 'CCC'{{.*}} <== {{.*}}overflows this variable +// UNSUPPORTED: custom-shadow-scale Index: compiler-rt/test/asan/TestCases/strtol_strict.c =================================================================== --- compiler-rt/test/asan/TestCases/strtol_strict.c +++ compiler-rt/test/asan/TestCases/strtol_strict.c @@ -21,6 +21,7 @@ // RUN: %run %t test7 2>&1 // RUN: %env_asan_opts=strict_string_checks=false %run %t test7 2>&1 // RUN: %env_asan_opts=strict_string_checks=true not %run %t test7 2>&1 | FileCheck %s --check-prefix=CHECK7 +// UNSUPPORTED: custom-shadow-scale #include #include Index: compiler-rt/test/asan/TestCases/strtoll_strict.c =================================================================== --- compiler-rt/test/asan/TestCases/strtoll_strict.c +++ compiler-rt/test/asan/TestCases/strtoll_strict.c @@ -24,6 +24,7 @@ // FIXME: Enable strtoll interceptor. // XFAIL: win32 +// UNSUPPORTED: custom-shadow-scale #include #include