1 //===-- tsan_report.h -------------------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of ThreadSanitizer (TSan), a race detector.
10 //===----------------------------------------------------------------------===//
14 #include "sanitizer_common/sanitizer_symbolizer.h"
15 #include "tsan_defs.h"
16 #include "tsan_vector.h"
23 ReportTypeUseAfterFree
,
24 ReportTypeVptrUseAfterFree
,
25 ReportTypeExternalRace
,
27 ReportTypeMutexDestroyLocked
,
28 ReportTypeMutexDoubleLock
,
29 ReportTypeMutexInvalidAccess
,
30 ReportTypeMutexBadUnlock
,
31 ReportTypeMutexBadReadLock
,
32 ReportTypeMutexBadReadUnlock
,
33 ReportTypeSignalUnsafe
,
34 ReportTypeErrnoInSignal
,
39 SymbolizedStack
*frames
;
41 static ReportStack
*New();
47 struct ReportMopMutex
{
59 Vector
<ReportMopMutex
> mset
;
65 enum ReportLocationType
{
73 struct ReportLocation
{
74 ReportLocationType type
;
76 uptr heap_chunk_start
;
84 static ReportLocation
*New(ReportLocationType type
);
86 explicit ReportLocation(ReportLocationType type
);
110 Vector
<ReportStack
*> stacks
;
111 Vector
<ReportMop
*> mops
;
112 Vector
<ReportLocation
*> locs
;
113 Vector
<ReportMutex
*> mutexes
;
114 Vector
<ReportThread
*> threads
;
115 Vector
<int> unique_tids
;
123 ReportDesc(const ReportDesc
&);
124 void operator = (const ReportDesc
&);
127 // Format and output the report to the console/log. No additional logic.
128 void PrintReport(const ReportDesc
*rep
);
129 void PrintStack(const ReportStack
*stack
);
131 } // namespace __tsan
133 #endif // TSAN_REPORT_H