1 //===-- tsan_report.h -------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of ThreadSanitizer (TSan), a race detector.
12 //===----------------------------------------------------------------------===//
16 #include "sanitizer_common/sanitizer_symbolizer.h"
17 #include "sanitizer_common/sanitizer_vector.h"
18 #include "tsan_defs.h"
25 ReportTypeUseAfterFree,
26 ReportTypeVptrUseAfterFree,
27 ReportTypeExternalRace,
29 ReportTypeMutexDestroyLocked,
30 ReportTypeMutexDoubleLock,
31 ReportTypeMutexInvalidAccess,
32 ReportTypeMutexBadUnlock,
33 ReportTypeMutexBadReadLock,
34 ReportTypeMutexBadReadUnlock,
35 ReportTypeSignalUnsafe,
36 ReportTypeErrnoInSignal,
41 SymbolizedStack *frames;
43 static ReportStack *New();
49 struct ReportMopMutex {
61 Vector<ReportMopMutex> mset;
67 enum ReportLocationType {
75 struct ReportLocation {
76 ReportLocationType type;
78 uptr heap_chunk_start;
86 static ReportLocation *New(ReportLocationType type);
88 explicit ReportLocation(ReportLocationType type);
112 Vector<ReportStack*> stacks;
113 Vector<ReportMop*> mops;
114 Vector<ReportLocation*> locs;
115 Vector<ReportMutex*> mutexes;
116 Vector<ReportThread*> threads;
117 Vector<int> unique_tids;
125 ReportDesc(const ReportDesc&);
126 void operator = (const ReportDesc&);
129 // Format and output the report to the console/log. No additional logic.
130 void PrintReport(const ReportDesc *rep);
131 void PrintStack(const ReportStack *stack);
133 } // namespace __tsan
135 #endif // TSAN_REPORT_H