[compiler-rt] 014c6b0 - sanitizer_common: fix ParseUnixMemoryProfile test linking on Mac
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 29 07:26:29 PDT 2021
Author: Dmitry Vyukov
Date: 2021-10-29T16:26:24+02:00
New Revision: 014c6b07362c8f70638da64526034abd097c8abb
URL: https://github.com/llvm/llvm-project/commit/014c6b07362c8f70638da64526034abd097c8abb
DIFF: https://github.com/llvm/llvm-project/commit/014c6b07362c8f70638da64526034abd097c8abb.diff
LOG: sanitizer_common: fix ParseUnixMemoryProfile test linking on Mac
The ParseUnixMemoryProfile function is defined only for a subset
of platforms. Define the test for the same set of platforms.
Also disable the test for 32-bit platforms b/c the pointer
values used in the test are 64-bit and don't fit into 32-bit uptr.
Reported-by: Jan Svoboda (jansvoboda11)
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D112815
Added:
Modified:
compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp
index 2157d4a03549..5cb799f949e6 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp
@@ -78,6 +78,9 @@ TEST(MemoryMapping, LoadedModuleArchAndUUID) {
}
}
+# if (SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD || \
+ SANITIZER_SOLARIS) && \
+ defined(_LP64)
const char *const parse_unix_input = R"(
7fb9862f1000-7fb9862f3000 rw-p 00000000 00:00 0
Size: 8 kB
@@ -129,6 +132,7 @@ TEST(MemoryMapping, ParseUnixMemoryProfileTruncated) {
}
UnmapOrDie(mem, 2 * page);
}
+# endif
} // namespace __sanitizer
#endif // !defined(_WIN32)
More information about the llvm-commits
mailing list