[compiler-rt] c489ae2 - [compiler-rt][asan][hwasan] Fix Android bots
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 15:11:16 PDT 2020
Author: Teresa Johnson
Date: 2020-07-16T15:11:02-07:00
New Revision: c489ae2a8605761d784171ff7152dfc75ab7c064
URL: https://github.com/llvm/llvm-project/commit/c489ae2a8605761d784171ff7152dfc75ab7c064
DIFF: https://github.com/llvm/llvm-project/commit/c489ae2a8605761d784171ff7152dfc75ab7c064.diff
LOG: [compiler-rt][asan][hwasan] Fix Android bots
Fix failure in Android bots from refactoring in
5d2be1a18845c528d3e86f7efcc59872e4a757c3 (https://crbug.com/1106482).
We need to make the UnmapFromTo available outside sanitizer_common for
calls from hwasan and asan linux handling. While here, remove
declaration of GetHighMemEnd which is no longer in sanitizer_common.
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_common.h
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
index 72e92e7ad70e..bf6ca735fb0d 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
@@ -121,9 +121,10 @@ bool MprotectReadOnly(uptr addr, uptr size);
void MprotectMallocZones(void *addr, int prot);
-// Get the max address, taking into account alignment due to the mmap
-// granularity and shadow size.
-uptr GetHighMemEnd(uptr shadow_scale);
+#if SANITIZER_LINUX
+// Unmap memory. Currently only used on Linux.
+void UnmapFromTo(uptr from, uptr to);
+#endif
// Maps shadow_size_bytes of shadow memory and returns shadow address. It will
// be aligned to the mmap granularity * 2^shadow_scale, or to
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
index d4e747d74ff3..86918a51a246 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
@@ -841,7 +841,7 @@ void ReExec() {
}
#endif // !SANITIZER_OPENBSD
-static void UnmapFromTo(uptr from, uptr to) {
+void UnmapFromTo(uptr from, uptr to) {
if (to == from)
return;
CHECK(to >= from);
More information about the llvm-commits
mailing list