On 28/02/2022 19:15, Bill Dunlap wrote:
valgrind will detect some of the memory issues that UBSAN does.

Only very few. None of the current 43 CRAN packages with UBSAN issues have them detected by valgrind ... the valgrind overlap is more with ASAN issues (see https://github.com/google/sanitizers/wiki/AddressSanitizerComparisonOfMemoryTools).

The UB sanitizer is heavily tied to the compiler. This has meant that new versions of gcc have found more and more issues and (most pertinently here) recent versions of clang find about twice as many issues as gcc 10/11.

UBSAN in theory runs on quite a range of platforms --- https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#supported-platforms -- which unfortunately does not say for which CPUs on those OS. (Also, that is about LLVM clang and not Apple clang as normally used on macOS. And gcc seems only to point to LLVM documentation for supported platforms, but its implementation clearly differs.)


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to