diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25ac730fbc..9a60351fcc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -252,6 +252,15 @@ linux64_fuzz-build: variables: BUILD_TARGET: linux64_fuzz +linux64_asan-build: + extends: + - .build-template + - .skip-in-fast-mode-template + needs: + - x86_64-pc-linux-gnu-debug + variables: + BUILD_TARGET: linux64_asan + linux64_tsan-build: extends: - .build-template @@ -315,6 +324,15 @@ linux64_sqlite-test: variables: BUILD_TARGET: linux64_sqlite +linux64_asan-test: + extends: + - .test-template + - .skip-in-fast-mode-template + needs: + - linux64_asan-build + variables: + BUILD_TARGET: linux64_asan + linux64_tsan-test: extends: - .test-template diff --git a/ci/dash/matrix.sh b/ci/dash/matrix.sh index b9ba18b3b9..26dcba42ef 100755 --- a/ci/dash/matrix.sh +++ b/ci/dash/matrix.sh @@ -11,6 +11,8 @@ export LC_ALL=C.UTF-8 source ./ci/test/00_setup_env.sh # Configure sanitizers options +export ASAN_OPTIONS="" +export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan" export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan" export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan" @@ -20,6 +22,8 @@ elif [ "$BUILD_TARGET" = "win64" ]; then source ./ci/test/00_setup_env_win64.sh elif [ "$BUILD_TARGET" = "linux64" ]; then source ./ci/test/00_setup_env_native_qt5.sh +elif [ "$BUILD_TARGET" = "linux64_asan" ]; then + source ./ci/test/00_setup_env_native_asan.sh elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then source ./ci/test/00_setup_env_native_tsan.sh elif [ "$BUILD_TARGET" = "linux64_ubsan" ]; then diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh new file mode 100644 index 0000000000..0e15669347 --- /dev/null +++ b/ci/test/00_setup_env_native_asan.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" +export NO_DEPENDS=1 +export FUNCTIONAL_TESTS_CONFIG="--exclude wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163) +export RUN_BENCH=true +export GOAL="install" +export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"