[PATCH] D31553: [tsan] Ignore memory accesses for libignored modules for "external" races

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 10:22:39 PDT 2017


kubamracek added inline comments.


================
Comment at: lib/tsan/rtl/tsan_external.cc:61
   thr->external_tag = (uptr)tag;
-  FuncEntry(thr, (uptr)caller_pc);
-  MemoryRead(thr, CALLERPC, (uptr)addr, kSizeLog8);
-  FuncExit(thr);
+  if (caller_pc) FuncEntry(thr, (uptr)caller_pc);
+  bool in_ignored_lib;
----------------
dvyukov wrote:
> I think I understand why I was confused. I assumed that caller_pc is literally caller pc. And caller can well point into the same library, and then this all does not make sense. But you seem to assume that caller_pc points user code (can be caller pc or several frames above that).
> 
> We now have include/sanitizer/tsan_interface.h, so please add __tsan_external_* functions there with proper comments that document these assumptions.
https://reviews.llvm.org/D32358


Repository:
  rL LLVM

https://reviews.llvm.org/D31553





More information about the llvm-commits mailing list