aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FormatString.cpp
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-09-06 20:38:25 +0000
committerDan Albert <danalbert@google.com>2014-09-06 20:38:25 +0000
commit0bb696800f6117b6b717e92fb5cb26efb5353116 (patch)
tree1685dc6de4d0fc6dc1d5c6cc1e3942fef4a072a7 /clang/lib/Analysis/FormatString.cpp
parenta9fcf62a9c273bc150ce793bd3489ca4e9af6c68 (diff)
downloadllvm-0bb696800f6117b6b717e92fb5cb26efb5353116.zip
llvm-0bb696800f6117b6b717e92fb5cb26efb5353116.tar.gz
llvm-0bb696800f6117b6b717e92fb5cb26efb5353116.tar.bz2
PR20546: Fix tests for compare_exchange_weak.
These calls are allowed to fail spuriously. 29.6.5.25: Remark: A weak compare-and-exchange operation may fail spuriously. That is, even when the contents of memory referred to by expected and object are equal, it may return false and store back to expected the same memory contents that were originally there. [ Note: This spurious failure enables implementation of compare and-exchange on a broader class of machines, e.g., load-locked store-conditional machines. A consequence of spurious failure is that nearly all uses of weak compare-and-exchange will be in a loop. To fix this, we replace any assert() that expects std::atomic::compare_exchange_weak() to return true with a loop. If the call does not return true within N runs (with N currently equal to 10), then the test fails. http://llvm.org/bugs/show_bug.cgi?id=20546 llvm-svn: 217319
Diffstat (limited to 'clang/lib/Analysis/FormatString.cpp')
0 files changed, 0 insertions, 0 deletions