Problem: we want to check for undefined behaviour in the CI

Solution: enable GCC's UBSAN in the sanitizer job
This commit is contained in:
Luca Boccassi 2020-05-05 12:16:51 +01:00
parent 0c5396849b
commit 3770937de3
2 changed files with 7 additions and 3 deletions

View File

@ -96,8 +96,12 @@ matrix:
- libbsd-dev
- env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled
os: osx
- env: BUILD_TYPE=default CURVE=tweetnacl DRAFT=enabled ADDRESS_SANITIZER=enabled
- env: BUILD_TYPE=default CURVE=libsodium DRAFT=enabled ADDRESS_SANITIZER=enabled
os: linux
addons:
apt:
packages:
- libsodium-dev
- env: BUILD_TYPE=android CURVE=tweetnacl
os: linux
dist: trusty

View File

@ -159,8 +159,8 @@ AC_ARG_ENABLE(address-sanitizer, [AS_HELP_STRING([--enable-address-sanitizer=yes
[ZMQ_ASAN="$enableval"])
if test "x${ZMQ_ASAN}" = "xyes"; then
CFLAGS="${CFLAGS} -fsanitize=address"
CXXFLAGS="${CXXFLAGS} -fsanitize=address"
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
CXXFLAGS="${CXXFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
AM_CONDITIONAL(ENABLE_ASAN, true)
AC_MSG_RESULT([yes])