build: TSan: add src/.tsan-suppressions

Uses runtime suppressions instead of a blacklist, which can only ignore
whole files/functions.

Ref: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
Ref: https://github.com/neovim/neovim/pull/10591#issuecomment-521248233
This commit is contained in:
Daniel Hahler
2019-08-14 22:16:05 +02:00
parent 7c0ae06664
commit ae31de32ee
3 changed files with 4 additions and 2 deletions

2
src/.tsan-suppressions Normal file
View File

@@ -0,0 +1,2 @@
# Ref: https://github.com/neovim/neovim/pull/10591#issuecomment-521248233
race:starting

View File

@@ -63,7 +63,7 @@ Enable the sanitizer(s) via these environment variables:
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
export MSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
export TSAN_OPTIONS="external_symbolizer_path=/usr/lib/llvm-5.0/bin/llvm-symbolizer log_path=${HOME}/logs/tsan"
export TSAN_OPTIONS="log_path=${HOME}/logs/tsan:suppressions=${NVIM_PATH}/src/.tsan-suppressions"
Logs will be written to `${HOME}/logs/*san.PID`.