[compiler-rt] db15b8a - [compiler-rt][asan][hwasan] Fix Fuchsia build
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 14:50:25 PDT 2020
Author: Teresa Johnson
Date: 2020-07-17T14:50:01-07:00
New Revision: db15b8ab90793e3707f72e7668c3844922fdf356
URL: https://github.com/llvm/llvm-project/commit/db15b8ab90793e3707f72e7668c3844922fdf356
DIFF: https://github.com/llvm/llvm-project/commit/db15b8ab90793e3707f72e7668c3844922fdf356.diff
LOG: [compiler-rt][asan][hwasan] Fix Fuchsia build
Fix build failure in Fuchsia build from refactoring in
5d2be1a18845c528d3e86f7efcc59872e4a757c3
Guard the moved versions of ReserveShadowMemoryRange and ProtectGap
the same way they were in the asan code originally (not for Fuchsia or
RTEMS). Otherwise we end up with unsats as they invoke functions not
defined there.
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp
index ddd688bb2dca..047c5a17ea6e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp
@@ -139,6 +139,8 @@ uptr ReservedAddressRange::InitAligned(uptr size, uptr align,
return start;
}
+#if !SANITIZER_FUCHSIA && !SANITIZER_RTEMS
+
// Reserve memory range [beg, end].
// We need to use inclusive range because end+1 may not be representable.
void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name,
@@ -188,6 +190,8 @@ void ProtectGap(uptr addr, uptr size, uptr zero_base_shadow_start,
Die();
}
+#endif // !SANITIZER_FUCHSIA && !SANITIZER_RTEMS
+
} // namespace __sanitizer
SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_sandbox_on_notify,
More information about the llvm-commits
mailing list