Improvements to the sanitizer workflow for the Github CI#3195
Improvements to the sanitizer workflow for the Github CI#3195oskooi merged 4 commits intoNanoComp:masterfrom
Conversation
|
Note: it is not necessary to change the argument This is because |
|
As additional information, UBSAN (Undefined Behavior Sanitizer) detects C/C++ undefined behavior at runtime, such as:
These are bugs where the C++ standard says "anything can happen" — the code may appear to work on one compiler/platform but crash or produce wrong results on another. UBSAN instruments the code at compile time and reports violations when the tests run. |
…with linked copy in test executables
|
The sanitizer checks for ASAN and UBSAN (which were run manually) are passing. |
1. MSAN is impractical for this project
MSAN (Memory Sanitizer) detects uninitialized memory reads, not memory leaks. The real reason it doesn't work (and has been commented out in
build-san.ymlsince #3014) is that MSAN requires all linked code — to be compiled with-fsanitize=memory. The system packages (libfftw3, libhdf5, libgsl, libharminv, etc.) are not MSAN-instrumented, so every call into them produces false positives. Making MSAN work would require building all dependencies from source with MSAN, which is a significant effort. The recommendation is to remove the commented-out MSAN entry entirely rather than leaving it as dead config.2. Dependency caching
Same as the main CI workflow changes in #3194 — the
apt-get installstep is fast since it uses pre-built packages, but caching would still help.