[PATCH] D46661: [tsan] Add debugging API to retrieve the "external tag" from reports

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 14:25:43 PDT 2018


delcypher added inline comments.


================
Comment at: lib/tsan/rtl/tsan_debugging.cc:89
+  *tag = rep->tag;
+  return 1;
+}
----------------
Why return 1? What does that mean?


================
Comment at: lib/tsan/rtl/tsan_interface.h:122
+SANITIZER_INTERFACE_ATTRIBUTE
+int __tsan_get_report_tag(void *report, uptr *tag);
+
----------------
There's no documentation on the meaning of the arguments or the return value here.



================
Comment at: test/tsan/Darwin/external-swift-debugging.cc:10
+extern "C" {
+int __tsan_get_report_data(void *report, const char **description, int *count,
+                           int *stack_count, int *mop_count, int *loc_count,
----------------
I know for ASan we ship the interface header with Clang. Do we not do that with TSan? If we do can you just include that so you don't have to redefine this here?


================
Comment at: test/tsan/Darwin/external-swift-debugging.cc:39
+  });
+  // CHECK: WARNING: ThreadSanitizer: Swift access race
+  // CHECK: Modifying access of Swift variable at {{.*}} by thread {{.*}}
----------------
I don't understand this. There's no Swift code in this test case so how is this a Swift access race?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D46661





More information about the llvm-commits mailing list