Commit 3c6c4188 authored by glider@chromium.org's avatar glider@chromium.org

Add default options for ThreadSanitizer on Linux. Enable deadlock detection by default.

BUG=372754
TBR=jyasskin@chromium.org

Review URL: https://codereview.chromium.org/296713002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271661 0039d316-1c4b-4281-b951-d872f2087c98
parent 7d9d82e1
...@@ -70,3 +70,21 @@ const char *__asan_default_options() { ...@@ -70,3 +70,21 @@ const char *__asan_default_options() {
} }
#endif // OS_LINUX || OS_MACOSX #endif // OS_LINUX || OS_MACOSX
#endif // ADDRESS_SANITIZER #endif // ADDRESS_SANITIZER
#if defined(THREAD_SANITIZER) && defined(OS_LINUX)
// Default options for ThreadSanitizer in various configurations:
// detect_deadlocks=1 - enable deadlock (lock inversion) detection.
// second_deadlock_stack=1 - more verbose deadlock reports.
const char kTsanDefaultOptions[] = "detect_deadlocks=1 second_deadlock_stack=1";
extern "C"
__attribute__((no_sanitize_thread))
__attribute__((visibility("default")))
// The function isn't referenced from the executable itself. Make sure it isn't
// stripped by the linker.
__attribute__((used))
const char *__tsan_default_options() {
return kTsanDefaultOptions;
}
#endif // THREAD_SANITIZER && OS_LINUX
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment