diff --git a/misc/cgo/testsanitizers/test.bash b/misc/cgo/testsanitizers/test.bash index d1d2dc6ae2..abbfb27d4b 100755 --- a/misc/cgo/testsanitizers/test.bash +++ b/misc/cgo/testsanitizers/test.bash @@ -15,6 +15,11 @@ if test -x "$(type -p clang)"; then fi export CC +if [ "$(sysctl -n vm.overcommit_memory)" = 2 ]; then + echo "skipping msan/tsan tests: vm.overcommit_memory=2" >&2 + exit 0 +fi + msan=yes TMPDIR=${TMPDIR:-/tmp}