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) {
790
790
return " " ;
791
791
}
792
792
793
+ #if SANITIZER_APPLE
794
+ const uptr kModuleUUIDSize = 16 ;
795
+ #else
793
796
const uptr kModuleUUIDSize = 32 ;
797
+ #endif
794
798
const uptr kMaxSegName = 16 ;
795
799
796
800
// 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
29
29
sanitizer_list_test.cpp
30
30
sanitizer_lzw_test.cpp
31
31
sanitizer_mac_test.cpp
32
+ sanitizer_module_uuid_size.cpp
32
33
sanitizer_mutex_test.cpp
33
34
sanitizer_nolibc_test.cpp
34
35
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