You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2020/12/05 19:11:23 UTC

svn commit: r1884136 - in /httpd/httpd/trunk: .travis.yml test/travis_run_linux.sh

Author: ylavic
Date: Sat Dec  5 19:11:22 2020
New Revision: 1884136

URL: http://svn.apache.org/viewvc?rev=1884136&view=rev
Log:
Add ASan (AddressSanitizer) build and tests to ci.

Github: closes #152

Modified:
    httpd/httpd/trunk/.travis.yml
    httpd/httpd/trunk/test/travis_run_linux.sh

Modified: httpd/httpd/trunk/.travis.yml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/.travis.yml?rev=1884136&r1=1884135&r2=1884136&view=diff
==============================================================================
--- httpd/httpd/trunk/.travis.yml (original)
+++ httpd/httpd/trunk/.travis.yml Sat Dec  5 19:11:22 2020
@@ -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

Modified: httpd/httpd/trunk/test/travis_run_linux.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/travis_run_linux.sh?rev=1884136&r1=1884135&r2=1884136&view=diff
==============================================================================
--- httpd/httpd/trunk/test/travis_run_linux.sh (original)
+++ httpd/httpd/trunk/test/travis_run_linux.sh Sat Dec  5 19:11:22 2020
@@ -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