[all-commits] [llvm/llvm-project] 151ed6: [TSAN] Add option to allow instrumenting reads of ...

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Fri May 15 07:09:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 151ed6aa38a3ec6c01973b35f684586b6e1c0f7e
      https://github.com/llvm/llvm-project/commit/151ed6aa38a3ec6c01973b35f684586b6e1c0f7e
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
    M llvm/test/Instrumentation/ThreadSanitizer/read_before_write.ll

  Log Message:
  -----------
  [TSAN] Add option to allow instrumenting reads of reads-before-writes

Add -tsan-instrument-read-before-write which allows instrumenting reads
of reads-before-writes.

This is required for KCSAN [1], where under certain configurations plain
writes behave differently (e.g. aligned writes up to word size may be
treated as atomic). In order to avoid missing potential data races due
to plain RMW operations ("x++" etc.), we will require instrumenting
reads of reads-before-writes.

[1] https://github.com/google/ktsan/wiki/KCSAN

Author: melver (Marco Elver)
Reviewed-in: https://reviews.llvm.org/D79983




More information about the All-commits mailing list