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'
// 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