From aa7b95facbb802cd62957f53a3734c3f8ca5b1b3 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 26 Jul 2022 06:58:11 +1000 Subject: [PATCH] sanitizer: disable "pointer-compare" --- nc_sanitizer.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nc_sanitizer.cmake b/nc_sanitizer.cmake index d33b8fc..d55d628 100644 --- a/nc_sanitizer.cmake +++ b/nc_sanitizer.cmake @@ -7,8 +7,13 @@ if (SANITIZER) append_compile_flag("--param max-gcse-memory=167772160") - append_compile_flag("-fsanitize=pointer-compare") + # Don't enable pointer-compare as https://github.com/google/sanitizers/issues/1324 + # states it isn't production-ready and it results in some link errors under (at least) gcc-11.3 + # eg, undefined reference to 'std::__cxx11::basic_stringbuf, std::allocator >::_M_high_mark() + # See also: https://github.com/cms-sw/cmssw/issues/36480 + # + #append_compile_flag("-fsanitize=pointer-compare") append_compile_flag("-fsanitize=pointer-subtract") add_definitions("-D_GLIBCXX_SANITIZE_VECTOR") -endif() \ No newline at end of file +endif()