From 8fbd61343a0a8d9deca6e39a4eef273c47d84097 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 19 Dec 2018 09:59:40 +0100 Subject: [PATCH] Disable RTLD_DEEPBIND when compiled under AddressSanitizer (cherry picked from commit cad6b39cabb78d0c0c2ae7201255948ed24766c5) --- bin/named/unix/dlz_dlopen_driver.c | 2 +- lib/dns/dyndb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index f4dc47ca217..1254472fac7 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -259,7 +259,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], /* Open the library */ dlopen_flags = RTLD_NOW|RTLD_GLOBAL; -#ifdef RTLD_DEEPBIND +#if defined(RTLD_DEEPBIND) && !__ADDRESS_SANITIZER__ /* * If RTLD_DEEPBIND is available then use it. This can avoid * issues with a module using a different version of a system diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c index 93ad7954012..e38480a275a 100644 --- a/lib/dns/dyndb.c +++ b/lib/dns/dyndb.c @@ -133,7 +133,7 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname, instname, filename); flags = RTLD_NOW|RTLD_LOCAL; -#ifdef RTLD_DEEPBIND +#if defined(RTLD_DEEPBIND) && !__ADDRESS_SANITIZER__ flags |= RTLD_DEEPBIND; #endif -- 2.47.3