Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 | 73 |
| 74 #if defined(THREAD_SANITIZER) && defined(OS_LINUX) | 74 #if defined(THREAD_SANITIZER) && defined(OS_LINUX) |
| 75 // Default options for ThreadSanitizer in various configurations: | 75 // Default options for ThreadSanitizer in various configurations: |
| 76 // detect_deadlocks=1 - enable deadlock (lock inversion) detection. | 76 // detect_deadlocks=1 - enable deadlock (lock inversion) detection. |
| 77 // second_deadlock_stack=1 - more verbose deadlock reports. | 77 // second_deadlock_stack=1 - more verbose deadlock reports. |
| 78 const char kTsanDefaultOptions[] = "detect_deadlocks=1 second_deadlock_stack=1"; | 78 // report_signal_unsafe=0 - do not report async-signal-unsafe functions |
| 79 // called from signal handlers. | |
| 80 // report_thread_leaks=0 - do not report unjoined threads at the end of | |
| 81 // the program execution. | |
| 82 // print_suppressions=1 - print the list of matched suppressions. | |
| 83 // suppressions=<path> - path to the suppressions file. | |
| 84 // external_symbolizer_path=<path> - path to the llvm-symbolizer binary. | |
| 85 const char kTsanDefaultOptions[] = | |
| 86 "detect_deadlocks=1 second_deadlock_stack=1 report_signal_unsafe=0 " | |
| 87 "report_thread_leaks=0 print_suppressions=1 " | |
| 88 "suppressions=tools/valgrind/tsan_v2/suppressions.txt " | |
| 89 "external_symbolizer_path=" | |
| 90 "third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer "; | |
|
earthdok
2014/05/21 12:03:07
If current dir != source root, this will break *ev
| |
| 79 | 91 |
| 80 extern "C" | 92 extern "C" |
| 81 __attribute__((no_sanitize_thread)) | 93 __attribute__((no_sanitize_thread)) |
| 82 __attribute__((visibility("default"))) | 94 __attribute__((visibility("default"))) |
| 83 // The function isn't referenced from the executable itself. Make sure it isn't | 95 // The function isn't referenced from the executable itself. Make sure it isn't |
| 84 // stripped by the linker. | 96 // stripped by the linker. |
| 85 __attribute__((used)) | 97 __attribute__((used)) |
| 86 const char *__tsan_default_options() { | 98 const char *__tsan_default_options() { |
| 87 return kTsanDefaultOptions; | 99 return kTsanDefaultOptions; |
| 88 } | 100 } |
| 89 | 101 |
| 90 #endif // THREAD_SANITIZER && OS_LINUX | 102 #endif // THREAD_SANITIZER && OS_LINUX |
| OLD | NEW |