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()