Skip to content

Commit aa9aca8

Browse files
committed
If tests are ran with (ASan + LSan), Docker needs access to ptrace
See google/sanitizers#764 for details
1 parent a3b8b43 commit aa9aca8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.travis/test_04_install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressio
1515
env | grep -E '^(BITCOIN_CONFIG|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
1616
if [[ $HOST = *-mingw32 ]]; then
1717
DOCKER_ADMIN="--cap-add SYS_ADMIN"
18+
elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
19+
DOCKER_ADMIN="--cap-add SYS_PTRACE"
1820
fi
1921
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)
2022

0 commit comments

Comments
 (0)