ci: add address and undefined sanitizer tasks

The current code is clean with these two sanitizers, and we would like to keep it that way by running the checks for any new code. The signal of "passed with asan, but not ubsan" (or vice versa) is not that useful in practice, so it is tempting to run both santizers in a single task, but it seems to take forever, so tentatively let's try having two separate ones. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Oct 20, 2022 at 09:20 UTC 1c0962c0c42f5fe5039d2dbd538c86b34f617408
2 files changed +12
.github/workflows/main.yml
+6
@@ -251,6 +251,12 @@ jobs:
251 - jobname: linux-leaks
252 cc: gcc
253 pool: ubuntu-latest
254 + - jobname: linux-asan
255 + cc: gcc
256 + pool: ubuntu-latest
257 + - jobname: linux-ubsan
258 + cc: gcc
259 + pool: ubuntu-latest
260 env:
261 CC: ${{matrix.vector.cc}}
262 CC_PACKAGE: ${{matrix.vector.cc_package}}
ci/lib.sh
+6
@@ -278,6 +278,12 @@ linux-leaks)
278 export GIT_TEST_PASSING_SANITIZE_LEAK=true
279 export GIT_TEST_SANITIZE_LEAK_LOG=true
280 ;;
281 +linux-asan)
282 + export SANITIZE=address
283 + ;;
284 +linux-ubsan)
285 + export SANITIZE=undefined
286 + ;;
287 esac
288
289 MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"