[PATCH] D16191: [tsan] Add TSan debugger APIs
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 08:36:49 PST 2016
dvyukov accepted this revision.
dvyukov added a comment.
This revision is now accepted and ready to land.
LGTM with nits
================
Comment at: lib/tsan/rtl/tsan_debugging.cc:57
@@ +56,3 @@
+SANITIZER_INTERFACE_ATTRIBUTE
+void *__tsan_get_current_report() {
+ const ReportDesc *rep = cur_thread()->current_report;
----------------
Please add a comment that this is meant to be manually called from a debugger.
================
Comment at: lib/tsan/rtl/tsan_rtl_report.cc:500
@@ -494,2 +499,3 @@
const ReportDesc *rep = srep.GetReport();
+ thr->current_report = rep;
Suppression *supp = 0;
----------------
I think it makes sense to do:
CHECK_EQ(thr->current_report, nullptr);
here. That would catch the bug below and any future similar bugs.
http://reviews.llvm.org/D16191
More information about the llvm-commits
mailing list