diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-01-17 12:59:10 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-01-17 12:59:10 +0000 |
commit | ad9d802b1564f3fcb7b05f0e00e8dce928b99bbc (patch) | |
tree | f9f7185c07e750e0400e4933872571db306843d2 /lib/sanitizer_common/sanitizer_lfstack.h | |
parent | f09086c028f37c9a8cf2582d4b4e922b16470a69 (diff) |
tsan: fix a bug
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_lfstack.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_lfstack.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_lfstack.h b/lib/sanitizer_common/sanitizer_lfstack.h index e0c88a934..c26e45db8 100644 --- a/lib/sanitizer_common/sanitizer_lfstack.h +++ b/lib/sanitizer_common/sanitizer_lfstack.h @@ -36,7 +36,7 @@ struct LFStack { void Push(T *p) { u64 cmp = atomic_load(&head_, memory_order_relaxed); for (;;) { - u64 cnt = (cmp & kCounterBits) + kCounterInc; + u64 cnt = (cmp & kCounterMask) + kCounterInc; u64 xch = (u64)(uptr)p | cnt; p->next = (T*)(uptr)(cmp & kPtrMask); if (atomic_compare_exchange_weak(&head_, &cmp, xch, |