File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -790,7 +790,11 @@ inline const char *ModuleArchToString(ModuleArch arch) {
790790 return " " ;
791791}
792792
793+ #if SANITIZER_APPLE
794+ const uptr kModuleUUIDSize = 16 ;
795+ #else
793796const uptr kModuleUUIDSize = 32 ;
797+ #endif
794798const uptr kMaxSegName = 16 ;
795799
796800// Represents a binary loaded into virtual memory (e.g. this can be an
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ set(SANITIZER_UNITTESTS
2929 sanitizer_list_test.cpp
3030 sanitizer_lzw_test.cpp
3131 sanitizer_mac_test.cpp
32+ sanitizer_module_uuid_size.cpp
3233 sanitizer_mutex_test.cpp
3334 sanitizer_nolibc_test.cpp
3435 sanitizer_posix_test.cpp
Original file line number Diff line number Diff line change 1+ #include " sanitizer_common/sanitizer_common.h"
2+ #include " gtest/gtest.h"
3+
4+ TEST (ModuleUUID, kModuleUUIDSize ) {
5+ #if SANITIZER_APPLE
6+ EXPECT_EQ (__sanitizer::kModuleUUIDSize , 16ULL );
7+ #else
8+ EXPECT_EQ (__sanitizer::kModuleUUIDSize , 32ULL );
9+ #endif
10+ }
You can’t perform that action at this time.
0 commit comments