[Sanitizers] Fix procmap tests for apple arm64
authorBlue Gaston <bgaston2@apple.com>
Thu, 22 Dec 2022 19:06:59 +0000 (14:06 -0500)
committerBlue Gaston <bgaston2@apple.com>
Tue, 3 Jan 2023 19:28:57 +0000 (12:28 -0700)
As part of effort to enable sanitizer common unit tests on arm64 apple devices.
Add kModuleArchARM64 as expected Arch

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

compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp

index 3201867..d4cc690 100644 (file)
@@ -65,11 +65,11 @@ TEST(MemoryMapping, LoadedModuleArchAndUUID) {
     memory_mapping.DumpListOfModules(&modules);
     for (uptr i = 0; i < modules.size(); ++i) {
       ModuleArch arch = modules[i].arch();
-      // Darwin unit tests are only run on i386/x86_64/x86_64h.
+      // Darwin unit tests are only run on i386/x86_64/x86_64h/arm64.
       if (SANITIZER_WORDSIZE == 32) {
         EXPECT_EQ(arch, kModuleArchI386);
       } else if (SANITIZER_WORDSIZE == 64) {
-        EXPECT_TRUE(arch == kModuleArchX86_64 || arch == kModuleArchX86_64H);
+        EXPECT_TRUE(arch == kModuleArchX86_64 || arch == kModuleArchX86_64H || kModuleArchARM64);
       }
       const u8 *uuid = modules[i].uuid();
       u8 null_uuid[kModuleUUIDSize] = {0};