LEFT | RIGHT |
1 //===-- tsan_report.cc ------------------------------------------*- C++ -*-===// | 1 //===-- tsan_report.cc ------------------------------------------*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file is a part of ThreadSanitizer (TSan), a race detector. | 10 // This file is a part of ThreadSanitizer (TSan), a race detector. |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 ReportDesc::~ReportDesc() { | 27 ReportDesc::~ReportDesc() { |
28 } | 28 } |
29 | 29 |
30 static void PrintHeader(ReportType typ) { | 30 static void PrintHeader(ReportType typ) { |
31 Printf("WARNING: ThreadSanitizer: "); | 31 Printf("WARNING: ThreadSanitizer: "); |
32 | 32 |
33 if (typ == ReportTypeRace) | 33 if (typ == ReportTypeRace) |
34 Printf("data race"); | 34 Printf("data race"); |
35 else if (typ == ReportTypeUseAfterFree) | 35 else if (typ == ReportTypeUseAfterFree) |
36 Printf("use after free"); | 36 Printf("heap-use-after-free"); |
37 else if (typ == ReportTypeThreadLeak) | 37 else if (typ == ReportTypeThreadLeak) |
38 Printf("thread leak"); | 38 Printf("thread leak"); |
39 else if (typ == ReportTypeMutexDestroyLocked) | 39 else if (typ == ReportTypeMutexDestroyLocked) |
40 Printf("destroy of a locked mutex"); | 40 Printf("destroy of a locked mutex"); |
41 else if (typ == ReportTypeSignalUnsafe) | 41 else if (typ == ReportTypeSignalUnsafe) |
42 Printf("signal-unsafe call inside of a signal"); | 42 Printf("signal-unsafe call inside of a signal"); |
43 | 43 |
44 Printf(" (pid=%d)\n", GetPid()); | 44 Printf(" (pid=%d)\n", GetPid()); |
45 } | 45 } |
46 | 46 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 for (uptr i = 0; i < rep->mutexes.Size(); i++) | 117 for (uptr i = 0; i < rep->mutexes.Size(); i++) |
118 PrintMutex(rep->mutexes[i]); | 118 PrintMutex(rep->mutexes[i]); |
119 | 119 |
120 for (uptr i = 0; i < rep->threads.Size(); i++) | 120 for (uptr i = 0; i < rep->threads.Size(); i++) |
121 PrintThread(rep->threads[i]); | 121 PrintThread(rep->threads[i]); |
122 | 122 |
123 Printf("==================\n"); | 123 Printf("==================\n"); |
124 } | 124 } |
125 | 125 |
126 } // namespace __tsan | 126 } // namespace __tsan |
LEFT | RIGHT |