[PATCH] D32382: [tsan] Track external tags in thread traces

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


kubamracek created this revision.
kubamracek added a project: Sanitizers.

To make the TSan external API work with Swift and other use cases, we need to track "tags" for individual memory accesses.  Since there is no space to store this information in shadow cells, let's use the thread traces for that.  This patch stores the tag as an extra frame in the stack traces (by calling FuncEntry and FuncExit with the address of a registered tag), this extra frame is then stripped before printing the backtrace to stderr.


Repository:
  rL LLVM

https://reviews.llvm.org/D32382

Files:
  lib/tsan/go/buildgo.sh
  lib/tsan/rtl/tsan_external.cc
  lib/tsan/rtl/tsan_report.cc
  lib/tsan/rtl/tsan_rtl.h
  lib/tsan/rtl/tsan_rtl_report.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32382.96248.patch
Type: text/x-patch
Size: 6022 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170421/fd894f25/attachment.bin>


More information about the llvm-commits mailing list