OSDN Git Service

[compiler-rt][asan][hwasan] Fix Android bots
authorTeresa Johnson <tejohnson@google.com>
Thu, 16 Jul 2020 21:42:00 +0000 (14:42 -0700)
committerTeresa Johnson <tejohnson@google.com>
Thu, 16 Jul 2020 22:11:02 +0000 (15:11 -0700)
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.

compiler-rt/lib/sanitizer_common/sanitizer_common.h
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

index 72e92e7..bf6ca73 100644 (file)
@@ -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
index d4e747d..86918a5 100644 (file)
@@ -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);