Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1157)

Delta Between Two Patch Sets: rtl/tsan_report.cc

Issue 6214052: tsan: detect use-after-free (Closed) Base URL: https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/tsan/
Left Patch Set: Created 12 years, 8 months ago
Right Patch Set: refactor freed bit Created 12 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « rtl/tsan_report.h ('k') | rtl/tsan_rtl.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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");
kcc1 2012/05/17 10:51:27 maybe print "heap-use-after-free" to match asan's
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
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
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b