diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-04-05 07:30:29 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-04-05 07:30:29 +0000 |
commit | 7ed46ff7af911da0dd2067734d1408c6986c6657 (patch) | |
tree | d1108ca92e40aa5ffd65528ce61fac03a7539615 /lib/sanitizer_common/sanitizer_common.h | |
parent | 6a7c51db8449fa948990501e65db4e71bf58e198 (diff) | |
download | compiler-rt-7ed46ff7af911da0dd2067734d1408c6986c6657.tar.gz compiler-rt-7ed46ff7af911da0dd2067734d1408c6986c6657.tar.bz2 compiler-rt-7ed46ff7af911da0dd2067734d1408c6986c6657.tar.xz |
[Sanitizer] Use a common mutex to prevent mixing reports from different sanitizers. This fixes PR15516
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_common.h b/lib/sanitizer_common/sanitizer_common.h index dfe2b40b..9df510b8 100644 --- a/lib/sanitizer_common/sanitizer_common.h +++ b/lib/sanitizer_common/sanitizer_common.h @@ -18,6 +18,7 @@ #include "sanitizer_internal_defs.h" #include "sanitizer_libc.h" +#include "sanitizer_mutex.h" namespace __sanitizer { struct StackTrace; @@ -109,6 +110,8 @@ bool PrintsToTty(); void Printf(const char *format, ...); void Report(const char *format, ...); void SetPrintfAndReportCallback(void (*callback)(const char *)); +// Can be used to prevent mixing error reports from different sanitizers. +extern StaticSpinMutex CommonSanitizerReportMutex; fd_t OpenFile(const char *filename, bool write); // Opens the file 'file_name" and reads up to 'max_len' bytes. |