summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_mac.cc
diff options
context:
space:
mode:
authorMaxim Ostapenko <chefmax7@gmail.com>2017-03-09 10:47:38 +0000
committerMaxim Ostapenko <chefmax7@gmail.com>2017-03-09 10:47:38 +0000
commit47bb7f41bd24d5edcc0931c4a89d7c1cceb41bc6 (patch)
treece780228c0ef6633977940a98c6f9346667e8828 /lib/sanitizer_common/sanitizer_mac.cc
parent208dd1dc5882a8335e4f0f72c74ec370c4fd528e (diff)
[sanitizer] Bail out with warning if user dlopens shared library with RTLD_DEEPBIND flag
People keep hitting on spurious failures in malloc/free routines when using sanitizers with shared libraries dlopened with RTLD_DEEPBIND (see https://github.com/google/sanitizers/issues/611 for details). Let's check for this flag and bail out with warning message instead of failing in random places. Differential Revision: https://reviews.llvm.org/D30504 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_mac.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_mac.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_mac.cc b/lib/sanitizer_common/sanitizer_mac.cc
index 2074b711e..8101d9515 100644
--- a/lib/sanitizer_common/sanitizer_mac.cc
+++ b/lib/sanitizer_common/sanitizer_mac.cc
@@ -886,6 +886,10 @@ void PrintModuleMap() {
Printf("End of module map.\n");
}
+void CheckNoDeepBind(const char *filename, int flag) {
+ // Do nothing.
+}
+
} // namespace __sanitizer
#endif // SANITIZER_MAC