summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-12-05 19:11:22 +0000
committerYann Ylavic <ylavic@apache.org>2020-12-05 19:11:22 +0000
commitb96e43fb257f3ad384818e297e44f590a0eb0701 (patch)
tree93ec7cefb2d062fe20af50be60dcb738c505d75e
parentff09d59a6bbaa547f4b527d35b6126b510b048fa (diff)
downloadhttpd-b96e43fb257f3ad384818e297e44f590a0eb0701.tar.gz
Add ASan (AddressSanitizer) build and tests to ci.
Github: closes #152 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1884136 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--.travis.yml9
-rwxr-xr-xtest/travis_run_linux.sh15
2 files changed, 23 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index c0573f4f81..7cbf3d1566 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -302,6 +302,15 @@ jobs:
dist: focal
env: NOTEST_CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined" NOTEST_LIBS=-lubsan
CONFIG="--enable-mods-shared=reallyall --disable-http2" TEST_UBSAN=1
+ # -------------------------------------------------------------------------
+ - name: Linux Ubuntu Focal, ASan
+ dist: focal
+ env: NOTEST_CFLAGS="-ggdb -fsanitize=address -fno-sanitize-recover=address -fno-omit-frame-pointer"
+ APR_VERSION=1.7.x APR_CONFIG="--enable-pool-debug"
+ APU_VERSION=1.7.x APU_CONFIG="--with-crypto --with-ldap"
+ CONFIG="--enable-mods-shared=reallyall"
+ TEST_ASAN=1
+ CLEAR_CACHE=1
allow_failures:
# Non-x86 are sometimes flaky:
- arch: s390x
diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh
index 390a8d2e4a..cf9064a848 100755
--- a/test/travis_run_linux.sh
+++ b/test/travis_run_linux.sh
@@ -84,6 +84,10 @@ if ! test -v SKIP_TESTING; then
export UBSAN_OPTIONS="log_path=$PWD/ubsan.log"
fi
+ if test -v TEST_ASAN; then
+ export ASAN_OPTIONS="log_path=$PWD/asan.log"
+ fi
+
if test -v WITH_TEST_SUITE; then
make check TESTS="${TESTS}" TEST_CONFIG="${TEST_ARGS}"
RV=$?
@@ -147,9 +151,18 @@ if ! test -v SKIP_TESTING; then
RV=3
fi
+ if test -v TEST_ASAN && ls asan.log.* &> /dev/null; then
+ cat asan.log.*
+
+ # ASan can report memory leaks, fail on errors only
+ if grep -q "ERROR: AddressSanitizer:" `ls asan.log.*`; then
+ RV=4
+ fi
+ fi
+
if test -f test/perl-framework/t/core; then
gdb -ex 'thread apply all backtrace' -batch ./httpd test/perl-framework/t/core
- RV=4
+ RV=5
fi
exit $RV