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
,
26 ReportTypeMutexDestroyLocked
,
27 ReportTypeMutexDoubleLock
,
28 ReportTypeMutexInvalidAccess
,
29 ReportTypeMutexBadUnlock
,
30 ReportTypeMutexBadReadLock
,
31 ReportTypeMutexBadReadUnlock
,
32 ReportTypeSignalUnsafe
,
33 ReportTypeErrnoInSignal
,
38 SymbolizedStack
*frames
;
40 static ReportStack
*New();
46 struct ReportMopMutex
{
57 Vector
<ReportMopMutex
> mset
;
63 enum ReportLocationType
{
71 struct ReportLocation
{
72 ReportLocationType type
;
74 uptr heap_chunk_start
;
81 static ReportLocation
*New(ReportLocationType type
);
83 explicit ReportLocation(ReportLocationType type
);
105 Vector
<ReportStack
*> stacks
;
106 Vector
<ReportMop
*> mops
;
107 Vector
<ReportLocation
*> locs
;
108 Vector
<ReportMutex
*> mutexes
;
109 Vector
<ReportThread
*> threads
;
110 Vector
<int> unique_tids
;
118 ReportDesc(const ReportDesc
&);
119 void operator = (const ReportDesc
&);
122 // Format and output the report to the console/log. No additional logic.
123 void PrintReport(const ReportDesc
*rep
);
124 void PrintStack(const ReportStack
*stack
);
126 } // namespace __tsan
128 #endif // TSAN_REPORT_H