[PATCH] D18164: [tsan] Do not instrument reads/writes to instruction profile counters.

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 15:48:22 PDT 2016


zaks.anna created this revision.
zaks.anna added reviewers: vsk, kcc, dvyukov, kubabrecka.
zaks.anna added a subscriber: llvm-commits.

We have known races on profile counters, which can be reproduced by enabling -fsanitize=thread and -fprofile-instr-generate simultaneously on a multi-threaded program. This patch avoids reporting those races by not instrumenting the reads and writes coming from the instruction profiler.

http://reviews.llvm.org/D18164

Files:
  include/llvm/ProfileData/InstrProf.h
  lib/ProfileData/InstrProf.cpp
  lib/Transforms/Instrumentation/ThreadSanitizer.cpp
  test/Instrumentation/ThreadSanitizer/do-not-instrument-memory-access.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18164.50666.patch
Type: text/x-patch
Size: 4334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160314/ca052fff/attachment.bin>


More information about the llvm-commits mailing list