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 ReportTypeMutexBadUnlock
,
29 ReportTypeMutexBadReadLock
,
30 ReportTypeMutexBadReadUnlock
,
31 ReportTypeSignalUnsafe
,
32 ReportTypeErrnoInSignal
,
37 SymbolizedStack
*frames
;
39 static ReportStack
*New();
45 struct ReportMopMutex
{
56 Vector
<ReportMopMutex
> mset
;
62 enum ReportLocationType
{
70 struct ReportLocation
{
71 ReportLocationType type
;
73 uptr heap_chunk_start
;
80 static ReportLocation
*New(ReportLocationType type
);
82 explicit ReportLocation(ReportLocationType type
);
104 Vector
<ReportStack
*> stacks
;
105 Vector
<ReportMop
*> mops
;
106 Vector
<ReportLocation
*> locs
;
107 Vector
<ReportMutex
*> mutexes
;
108 Vector
<ReportThread
*> threads
;
109 Vector
<int> unique_tids
;
117 ReportDesc(const ReportDesc
&);
118 void operator = (const ReportDesc
&);
121 // Format and output the report to the console/log. No additional logic.
122 void PrintReport(const ReportDesc
*rep
);
123 void PrintStack(const ReportStack
*stack
);
125 } // namespace __tsan
127 #endif // TSAN_REPORT_H