Skip to content

Commit 1c0962c

Browse files
committed
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bbe21b6 commit 1c0962c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ jobs:
251251
- jobname: linux-leaks
252252
cc: gcc
253253
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
254260
env:
255261
CC: ${{matrix.vector.cc}}
256262
CC_PACKAGE: ${{matrix.vector.cc_package}}

ci/lib.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ linux-leaks)
278278
export GIT_TEST_PASSING_SANITIZE_LEAK=true
279279
export GIT_TEST_SANITIZE_LEAK_LOG=true
280280
;;
281+
linux-asan)
282+
export SANITIZE=address
283+
;;
284+
linux-ubsan)
285+
export SANITIZE=undefined
286+
;;
281287
esac
282288

283289
MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"

0 commit comments

Comments
 (0)