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 "tsan_defs.h"
18 #include "tsan_vector.h"
25 ReportTypeUseAfterFree,
26 ReportTypeVptrUseAfterFree,
28 ReportTypeMutexDestroyLocked,
29 ReportTypeMutexDoubleLock,
30 ReportTypeMutexInvalidAccess,
31 ReportTypeMutexBadUnlock,
32 ReportTypeMutexBadReadLock,
33 ReportTypeMutexBadReadUnlock,
34 ReportTypeSignalUnsafe,
35 ReportTypeErrnoInSignal,
40 SymbolizedStack *frames;
42 static ReportStack *New();
48 struct ReportMopMutex {
59 Vector<ReportMopMutex> mset;
65 enum ReportLocationType {
73 struct ReportLocation {
74 ReportLocationType type;
76 uptr heap_chunk_start;
83 static ReportLocation *New(ReportLocationType type);
85 explicit ReportLocation(ReportLocationType type);
107 Vector<ReportStack*> stacks;
108 Vector<ReportMop*> mops;
109 Vector<ReportLocation*> locs;
110 Vector<ReportMutex*> mutexes;
111 Vector<ReportThread*> threads;
112 Vector<int> unique_tids;
120 ReportDesc(const ReportDesc&);
121 void operator = (const ReportDesc&);
124 // Format and output the report to the console/log. No additional logic.
125 void PrintReport(const ReportDesc *rep);
126 void PrintStack(const ReportStack *stack);
128 } // namespace __tsan
130 #endif // TSAN_REPORT_H