[Sanitizer][Apple] Enable sanitizer common unittests for arm64 archs on Apple
authorBlue Gaston <bgaston2@apple.com>
Sat, 7 Jan 2023 00:26:54 +0000 (17:26 -0700)
committerBlue Gaston <bgaston2@apple.com>
Tue, 10 Jan 2023 21:47:32 +0000 (13:47 -0800)
This patch enables sanitizer common unit tests for arm64 architecture only on apple devices.

It also lowers the expected compression ratio for 64 bit machines. Unsure of justification of 130. On apple arm64 we're seeing this number comeout to 128.6

rdar://101436019

Differential Revision: https://reviews.llvm.org/D141170

compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
compiler-rt/lib/sanitizer_common/tests/sanitizer_stack_store_test.cpp

index 41b89aa..0c729ec 100644 (file)
@@ -5,6 +5,7 @@ clang_compiler_add_cxx_check()
 # FIXME: use SANITIZER_COMMON_SUPPORTED_ARCH here
 filter_available_targets(SANITIZER_UNITTEST_SUPPORTED_ARCH x86_64 i386 mips64 mips64el riscv64 sparcv9 sparc)
 if(APPLE)
+  list(APPEND SANITIZER_UNITTEST_SUPPORTED_ARCH arm64)
   darwin_filter_host_archs(SANITIZER_UNITTEST_SUPPORTED_ARCH SANITIZER_UNITTEST_SUPPORTED_ARCH)
 endif()
 
index ab49135..57be1c9 100644 (file)
@@ -138,7 +138,7 @@ INSTANTIATE_TEST_SUITE_P(
         StackStorePackTest::ParamType(StackStore::Compression::Delta,
                                       FIRST_32_SECOND_64(2, 6)),
         StackStorePackTest::ParamType(StackStore::Compression::LZW,
-                                      FIRST_32_SECOND_64(60, 130)),
+                                      FIRST_32_SECOND_64(60, 125)),
     }));
 
 TEST_P(StackStorePackTest, PackUnpack) {