Wire up thread sanitizer. (#319)

This commit is contained in:
Chinmay Garde 2019-10-04 14:18:33 -07:00 committed by GitHub
parent 8168eb1d09
commit a2a0a4e8ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 14 deletions

View File

@ -46,12 +46,6 @@ config("feature_flags") {
if (use_allocator != "tcmalloc") {
defines += [ "NO_TCMALLOC" ]
}
if (is_asan || is_lsan || is_tsan || is_msan || is_ios) {
defines += [
"MEMORY_TOOL_REPLACES_ALLOCATOR",
"MEMORY_SANITIZER_INITIAL_SIZE",
]
}
if (is_asan) {
defines += [ "ADDRESS_SANITIZER" ]
}

View File

@ -122,12 +122,8 @@ config("compiler") {
cflags += [ "-fsanitize=leak" ]
}
if (is_tsan) {
tsan_blacklist_path =
rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
cflags += [
"-fsanitize=thread",
"-fsanitize-blacklist=$tsan_blacklist_path",
]
cflags += [ "-fsanitize=thread" ]
ldflags += [ "-fsanitize=thread" ]
}
if (is_msan) {
msan_blacklist_path =

View File

@ -5,8 +5,7 @@
declare_args() {
# Use libc++ (buildtools/third_party/libc++ and
# buildtools/third_party/libc++abi) instead of stdlibc++ as standard library.
# This is intended to be used for instrumented builds.
use_custom_libcxx = (is_asan && is_linux) || is_tsan || is_msan
use_custom_libcxx = false
# Track where uninitialized memory originates from. From fastest to slowest:
# 0 - no tracking, 1 - track only the initial allocation site, 2 - track the