[PATCH] D99434: [TSAN] Honor acquire failure mode on AtomicCAS

Bruno Cardoso Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 12:12:28 PDT 2021


bruno created this revision.
bruno added a reviewer: dvyukov.
Herald added subscribers: hoy, modimo, wenlei, lxfind.
bruno requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The lack of failure mode support for compare_exchange causes false positives when using release/acquire (success/failure) memory orders. Add acquire fmo handling and a testcase.

While here add a testcase for release/relaxed (success/failure) memory orders leading to a race.

https://github.com/google/sanitizers/issues/970


https://reviews.llvm.org/D99434

Files:
  compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cpp
  compiler-rt/test/tsan/compare_exchange_release_acquire.cpp
  compiler-rt/test/tsan/compare_exchange_release_relaxed.cpp
  llvm/test/Instrumentation/ThreadSanitizer/atomic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99434.333603.patch
Type: text/x-patch
Size: 3969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210326/a4146ca7/attachment.bin>


More information about the llvm-commits mailing list