]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add Travis job which runs under UBSan ("Undefined Behaviour Sanitizer").
authorJoe Orton <jorton@apache.org>
Wed, 19 Feb 2020 11:18:21 +0000 (11:18 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 19 Feb 2020 11:18:21 +0000 (11:18 +0000)
mod_http2 disabled for now until https://github.com/icing/mod_h2/pull/194
is merged.

Github: closes #96

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1874190 13f79535-47bb-0310-9956-ffa450edef68

.travis.yml
test/travis_run_linux.sh

index 6c71441f8ec7210a68c16956244bfff375407625..e4102465a206e7d48fe2a7fe09ebbac3c3e03d97 100644 (file)
@@ -173,6 +173,10 @@ matrix:
       env: APR_VERSION=1.4.8 APU_VERSION=1.4.2
            CONFIG="--enable-mods-shared=reallyall"
     # -------------------------------------------------------------------------
+    - if: branch != 2.4.x
+      name: Linux Ubuntu, UBSan
+      env: NOTEST_CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined" NOTEST_LIBS=-lubsan
+           CONFIG="--enable-mods-shared=reallyall --disable-http2" TEST_UBSAN=1
 
 before_install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
index 90ac2c81389944d3dd4582cc3920443d38f6c308..c20feb958799059ef6a855f83cb20ea20f9479d1 100755 (executable)
@@ -25,14 +25,23 @@ else
 fi
 ./configure $CONFIG
 make $MFLAGS
+
 if ! test -v SKIP_TESTING; then
+    set +e
+
+    if test -v TEST_UBSAN; then
+        export UBSAN_OPTIONS="log_path=$PWD/ubsan.log"
+    fi
+
     if test -v WITH_TEST_SUITE; then
         make check TESTS="${TEST_ARGS}"
+        RV=$?
     else
         make install
         pushd test/perl-framework
             perl Makefile.PL -apxs $HOME/build/httpd-root/bin/apxs
             make test APACHE_TEST_EXTRA_ARGS="${TEST_ARGS}"
+            RV=$?
         popd
     fi
     if test -v LITMUS; then
@@ -40,7 +49,19 @@ if ! test -v SKIP_TESTING; then
            mkdir -p t/htdocs/modules/dav
            ./t/TEST -start
            litmus http://localhost:8529/modules/dav/
+           RV=$?
            ./t/TEST -stop
         popd
     fi
+
+    if grep -q 'Segmentation fault' test/perl-framework/t/logs/error_log; then
+        grep -C5 'Segmentation fault' test/perl-framework/t/logs/error_log
+        RV=2
+    fi
+    if test -v TEST_UBSAN && ls ubsan.log.* &> /dev/null; then
+        cat ubsan.log.*
+        RV=3
+    fi
+
+    exit $RV
 fi