From 233a364bd8c4bd244b675ff2b9dd3381d0e84e4e Mon Sep 17 00:00:00 2001 From: Francis Ricci Date: Wed, 18 May 2016 16:05:52 +0000 Subject: [PATCH] [sanitizer] Allow dlopen/dlclose interception to be disabled from cmake Summary: dlopen and dlclose interception are broken when RUNPATH is used: https://llvm.org/bugs/show_bug.cgi?id=27790 Reviewers: kutuzov.viktor.84, samsonov, dvyukov, eugenis, kcc Subscribers: kcc, filcab, kubabrecka, compnerd, llvm-commits Differential Revision: http://reviews.llvm.org/D20333 llvm-svn: 269947 --- .../lib/sanitizer_common/sanitizer_platform_interceptors.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index 75b3a01edb4c..d22f0f5f1e2f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -280,8 +280,12 @@ #define SANITIZER_INTERCEPT_OBSTACK SI_LINUX_NOT_ANDROID #define SANITIZER_INTERCEPT_FFLUSH SI_NOT_WINDOWS #define SANITIZER_INTERCEPT_FCLOSE SI_NOT_WINDOWS + +#ifndef SANITIZER_INTERCEPT_DLOPEN_DLCLOSE #define SANITIZER_INTERCEPT_DLOPEN_DLCLOSE \ SI_FREEBSD || SI_LINUX_NOT_ANDROID || SI_MAC +#endif + #define SANITIZER_INTERCEPT_GETPASS SI_LINUX_NOT_ANDROID || SI_MAC #define SANITIZER_INTERCEPT_TIMERFD SI_LINUX_NOT_ANDROID