mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Wire up thread sanitizer. (#319)
This commit is contained in:
parent
8168eb1d09
commit
a2a0a4e8ca
@ -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" ]
|
||||
}
|
||||
|
@ -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 =
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user