selftest: Disable RTLD_DEEPBIND if running with ASAN
authorGary Lockyer <gary@catalyst.net.nz>
Mon, 20 May 2019 20:49:08 +0000 (08:49 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 16 Oct 2019 15:41:41 +0000 (15:41 +0000)
Disable the RTLD_DEEPBIND option for dlopen in LDB and Socket Wrapper when
running with  AddressSanitizer. The RTLD_DEEPBIND option is not compatible
with Address Sanitizer see
https://github.com/google/sanitizers/issues/611

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 16 15:41:41 UTC 2019 on sn-devel-184

selftest/wscript

index f204f34201ba2fc49ec0b11ad43fd68bef033f7e..4d03eb76842351239f2769ba2caa2670b5f355cb 100644 (file)
@@ -289,7 +289,10 @@ def cmd_testonly(opt):
 
     if env.ADDRESS_SANITIZER:
         # For now we cannot run with leak detection
-        no_leak_check = "ASAN_OPTIONS=detect_leaks=0"
+        no_leak_check = "ASAN_OPTIONS=detect_leaks=0 "
+        # And we need to disable RTLD_DEEPBIND in ldb and socket wrapper
+        no_leak_check += "LDB_MODULES_DISABLE_DEEPBIND=1 "
+        no_leak_check += "SOCKET_WRAPPER_DISABLE_DEEP_BIND=1"
         env.CORE_COMMAND = no_leak_check + " " + env.CORE_COMMAND
 
         # We need to have the subunit filter and formatter preload