From: Otto Moerbeek Date: Mon, 10 Mar 2025 08:12:42 +0000 (+0100) Subject: Also set HAVE_LEAK_SANITIZER_INTERFACE on lsan X-Git-Tag: dnsdist-2.0.0-alpha1~32^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6082f86585f3996028e7aaa2e1094efcd6df15ab;p=thirdparty%2Fpdns.git Also set HAVE_LEAK_SANITIZER_INTERFACE on lsan --- diff --git a/meson/sanitizers/meson.build b/meson/sanitizers/meson.build index afeb398c5a..e7ba61a286 100644 --- a/meson/sanitizers/meson.build +++ b/meson/sanitizers/meson.build @@ -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' diff --git a/pdns/recursordist/mtasker_context.cc b/pdns/recursordist/mtasker_context.cc index 563b91606b..b162d68771 100644 --- a/pdns/recursordist/mtasker_context.cc +++ b/pdns/recursordist/mtasker_context.cc @@ -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