run "autoreconf -vi"
# Build without --enable-botan, no botan 2.x in Travis CI
run "./configure \
+ ${sanitizerflags} \
--with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote tinydns godbc lua2' \
--with-modules='' \
--with-sqlite3 \
run "cd pdns-recursor-*"
# Build without --enable-botan, no botan 2.x in Travis CI
run "CXX=${COMPILER} ./configure \
+ ${sanitizerflags} \
--prefix=$PDNS_RECURSOR_DIR \
--enable-libsodium \
--enable-unit-tests \
run "tar xf dnsdist*.tar.bz2"
run "cd dnsdist-*"
run "./configure \
+ ${sanitizerflags} \
--enable-unit-tests \
--enable-libsodium \
--enable-dnscrypt \
run "cd ${TRAVIS_BUILD_DIR}"
compilerflags="-O1 -Werror=vla"
+sanitizerflags=""
if [ "$CC" = "clang" ]
then
compilerflags="$compilerflags -Werror=string-plus-int"
+ if [ "${PDNS_BUILD_PRODUCT}" = "recursor" ]; then
+ sanitizerflags="${sanitizerflags} --enable-asan"
+ elif [ "${PDNS_BUILD_PRODUCT}" = "dnsdist" ]; then
+ sanitizerflags="${sanitizerflags} --enable-asan --enable-ubsan"
+ fi
fi
export CFLAGS=$compilerflags
export CXXFLAGS=$compilerflags
+export sanitizerflags
+export UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1"
install_$PDNS_BUILD_PRODUCT