]> granicus.if.org Git - graphviz/commitdiff
CI: make UBSan errors fatal in sanitizer job
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Jun 2022 16:15:55 +0000 (09:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Jun 2022 03:04:35 +0000 (20:04 -0700)
When enabling ASan and UBSan, ASan defaults to aborting execution on a detected
error while UBSan defaults to a warning and then continuing. The effect of this
is that any UBSan issues go unnoticed in CI when no one is monitoring stderr.
This change makes UBSan issues also have abort behavior.

Gitlab: fixes #2200

.gitlab-ci.yml

index 43558ee3bb6a7fbdeb6bf368b3ecf2ee37e5cb69..32a5c15e5a7014803a9844e565283c14c3ed8bb4 100644 (file)
@@ -755,8 +755,8 @@ ubuntu22-04-cmake-ASan-build-for-ctest:
     before_script:
         - export build_system="cmake"
         # fail on any compiler warnings
-        - export CFLAGS="-fsanitize=address,undefined -g -Werror"
-        - export CXXFLAGS="-fsanitize=address,undefined -g -Werror"
+        - export CFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=address,undefined -g -Werror"
+        - export CXXFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=address,undefined -g -Werror"
         - export CMAKE_OPTIONS="-Duse_coverage=ON -Dwith_cxx_tests=ON -Dwith_cxx_api=ON"
         - export CMAKE_OPTIONS="$CMAKE_OPTIONS -Dwith_smyrna=ON"
     # override the deb_build_definition artifacts since we need more