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 ReportTypeMutexBadUnlock,
31 ReportTypeMutexBadReadLock,
32 ReportTypeMutexBadReadUnlock,
33 ReportTypeSignalUnsafe,
34 ReportTypeErrnoInSignal,
39 SymbolizedStack *frames;
41 static ReportStack *New();
47 struct ReportMopMutex {
58 Vector<ReportMopMutex> mset;
64 enum ReportLocationType {
72 struct ReportLocation {
73 ReportLocationType type;
75 uptr heap_chunk_start;
82 static ReportLocation *New(ReportLocationType type);
84 explicit ReportLocation(ReportLocationType type);
106 Vector<ReportStack*> stacks;
107 Vector<ReportMop*> mops;
108 Vector<ReportLocation*> locs;
109 Vector<ReportMutex*> mutexes;
110 Vector<ReportThread*> threads;
111 Vector<int> unique_tids;
119 ReportDesc(const ReportDesc&);
120 void operator = (const ReportDesc&);
123 // Format and output the report to the console/log. No additional logic.
124 void PrintReport(const ReportDesc *rep);
125 void PrintStack(const ReportStack *stack);
127 } // namespace __tsan
129 #endif // TSAN_REPORT_H