tsan: more precise handling of atomic stores
authorDmitry Vyukov <dvyukov@google.com>
Tue, 8 Nov 2016 05:34:50 +0000 (05:34 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 8 Nov 2016 05:34:50 +0000 (05:34 +0000)
commit62f99cc4864364d6bd01321a4dccb4466618a318
tree9c3d5faa61b41daf1c8c4a91d75f597874bc5f63
parent5ca4d5f5fe3094beaeb2fca3be046a3191f67702
tsan: more precise handling of atomic stores

Atomic stores terminate release sequences on the atomic variable,
and must use ReleaseStore primitive instead of Release.
This was broken in r192355 during a refactoring.
Restore correct behavior and add a test.

llvm-svn: 286211
compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc
compiler-rt/test/tsan/atomic_store.cc [new file with mode: 0644]