]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Also set HAVE_LEAK_SANITIZER_INTERFACE on lsan 15263/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 10 Mar 2025 08:12:42 +0000 (09:12 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 10 Mar 2025 08:17:25 +0000 (09:17 +0100)
meson/sanitizers/meson.build
pdns/recursordist/mtasker_context.cc

index afeb398c5a9ee85c9d9f9f8e0e88683efdb20173..e7ba61a286eba2c1e004dc77f50218a36db1b6a6 100644 (file)
@@ -1,12 +1,21 @@
 opt_sanitize = get_option('b_sanitize')
+leak_detection = false
 
 if opt_sanitize == 'address' or opt_sanitize == 'address,undefined'
   subdir('address-sanitizer-fiber-switching')
-  conf.set(
-    'HAVE_LEAK_SANITIZER_INTERFACE',
-    cxx.has_header('sanitizer/lsan_interface.h'),
-    description: 'Have leak sanitizer inteface',
-  )
+  leak_detection = true
+endif
+
+if opt_sanitize == 'leak'
+  leak_detection = true
+endif
+
+if leak_detection
+    conf.set(
+        'HAVE_LEAK_SANITIZER_INTERFACE',
+        cxx.has_header('sanitizer/lsan_interface.h'),
+        description: 'Have leak sanitizer inteface',
+    )
 endif
 
 if opt_sanitize != 'none'
index 563b91606b0cd389d7ba8e555e904421aefbfce3..b162d6877112682b591b181c9952fe23d12381c4 100644 (file)
@@ -122,6 +122,7 @@ extern "C"
   // ASAN_OPTIONS=detect_stack_use_after_return=0 or completely disable it by compiling with
   // -fsanitize-address-use-after-return=never.  On debian clang versions up and including 14 do
   // not seem to trigger a problem here, but starting from version 15 they do.
+  // Attempts at using function attributes to silence the error did not work.
   threadWrapper(transfer_t const theThread)
   {
 #endif