From: Joe Orton Date: Wed, 19 Feb 2020 11:18:21 +0000 (+0000) Subject: Add Travis job which runs under UBSan ("Undefined Behaviour Sanitizer"). X-Git-Tag: 2.5.0-alpha2-ci-test-only~1637 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08aaaea5fee05647b333c1a60d4b25ba4a546be5;p=thirdparty%2Fapache%2Fhttpd.git Add Travis job which runs under UBSan ("Undefined Behaviour Sanitizer"). 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 --- diff --git a/.travis.yml b/.travis.yml index 6c71441f8ec..e4102465a20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index 90ac2c81389..c20feb95879 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -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