Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: base/debug/sanitizer_options.cc

Issue 272763005: Add default options for ThreadSanitizer on Linux. Enable deadlock detection by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file contains the default options for various compiler-based dynamic 5 // This file contains the default options for various compiler-based dynamic
6 // tools. 6 // tools.
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 // Functions returning default options are declared weak in the tools' runtime 10 // Functions returning default options are declared weak in the tools' runtime
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 __attribute__((no_sanitize_address)) 63 __attribute__((no_sanitize_address))
64 __attribute__((visibility("default"))) 64 __attribute__((visibility("default")))
65 // The function isn't referenced from the executable itself. Make sure it isn't 65 // The function isn't referenced from the executable itself. Make sure it isn't
66 // stripped by the linker. 66 // stripped by the linker.
67 __attribute__((used)) 67 __attribute__((used))
68 const char *__asan_default_options() { 68 const char *__asan_default_options() {
69 return kAsanDefaultOptions; 69 return kAsanDefaultOptions;
70 } 70 }
71 #endif // OS_LINUX || OS_MACOSX 71 #endif // OS_LINUX || OS_MACOSX
72 #endif // ADDRESS_SANITIZER 72 #endif // ADDRESS_SANITIZER
73
74 #if defined(THREAD_SANITIZER) && defined(OS_LINUX)
75 // Default options for ThreadSanitizer in various configurations:
76 // detect_deadlocks=1 - enable deadlock (lock inversion) detection.
77 // second_deadlock_stack=1 - more verbose deadlock reports.
78 const char kTsanDefaultOptions[] = "detect_deadlocks=1 second_deadlock_stack=1";
79
80 extern "C"
81 __attribute__((no_sanitize_thread))
82 __attribute__((visibility("default")))
83 // The function isn't referenced from the executable itself. Make sure it isn't
84 // stripped by the linker.
85 __attribute__((used))
86 const char *__tsan_default_options() {
87 return kTsanDefaultOptions;
88 }
89
90 #endif // THREAD_SANITIZER && OS_LINUX
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698