Skip to content

Commit

Permalink
Add ubsan to the asan CI check.
Browse files Browse the repository at this point in the history
We already have address sanitizer, so add "undefined" into the mix.
  • Loading branch information
jkbonfield committed Jul 18, 2024
1 parent f8016c0 commit e33036b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ compile_template: &COMPILE
if test "x$DO_MAINTAINER_CHECKS" = "xyes"; then
make maintainer-check
fi
$CC --version
make -j 4 $MAKE_OPTS
test_template: &TEST
Expand Down Expand Up @@ -73,9 +74,11 @@ gcc_task:
USE_CONFIG: no
- environment:
USE_CONFIG: yes
CFLAGS: -std=c99 -pedantic -Wformat=2 -fsanitize=address
LDFLAGS: -fsanitize=address
# ubsan is incompatible with -Wformat=2 so we do that on clang.
CFLAGS: -fsanitize=address,undefined -DHTS_ALLOW_UNALIGNED=0
LDFLAGS: -fsanitize=address,undefined
USE_LIBDEFLATE: yes
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1

install_script: |
apt-get update
Expand Down Expand Up @@ -108,8 +111,9 @@ ubuntu_task:
USE_CONFIG: yes
DO_UNTRACKED_FILE_CHECK: yes
- environment:
# Cirrus-CI's clang isn't installed with ubsan, so we do that in gcc
USE_CONFIG: yes
CFLAGS: -g -Wall -O3
CFLAGS: -std=c99 -pedantic -Wformat -g -Wall -O3
USE_LIBDEFLATE: yes

# NB: we could consider building a docker image with these
Expand Down

0 comments on commit e33036b

Please sign in to comment.