[PATCH] D46597: [sanitizer] Correct 64-bit atomic_store on 32-bit "other" platforms

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 09:26:57 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL331890: [sanitizer] Correct 64-bit atomic_store on 32-bit "other" platforms (authored by cryptoad, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D46597

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h
@@ -86,7 +86,7 @@
     typename T::Type cur;
     for (;;) {
       cur = __sync_val_compare_and_swap(&a->val_dont_use, cmp, v);
-      if (cmp == v)
+      if (cur == cmp || cur == v)
         break;
       cmp = cur;
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46597.145942.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180509/570f44a2/attachment.bin>


More information about the llvm-commits mailing list