[llvm-commits] [compiler-rt] r172710 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h
David Blaikie
dblaikie at gmail.com
Thu Jan 17 08:04:37 PST 2013
On Jan 17, 2013 4:14 AM, "Dmitry Vyukov" <dvyukov at google.com> wrote:
>
> Author: dvyukov
> Date: Thu Jan 17 06:13:03 2013
> New Revision: 172710
>
> URL: http://llvm.org/viewvc/llvm-project?rev=172710&view=rev
> Log:
> tsan: fix a bug
A little more specificity might be nice, though perhaps simply 'fix a typo'
would suffice here.
>
> Modified:
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h
> URL:
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h?rev=172710&r1=172709&r2=172710&view=diff
>
==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_lfstack.h Thu Jan 17
06:13:03 2013
> @@ -52,7 +52,7 @@
> if (cur == 0)
> return 0;
> T *nxt = cur->next;
> - u64 cnt = (cmp & kCounterBits);
> + u64 cnt = (cmp & kCounterMask);
While sometimes these sorts of issues, when found by inspection, are hard
to concoct tests for, I'll ask anyway, just in case: could you add a test
case for this?
> u64 xch = (u64)(uptr)nxt | cnt;
> if (atomic_compare_exchange_weak(&head_, &cmp, xch,
> memory_order_acquire))
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130117/0a609111/attachment.html>
More information about the llvm-commits
mailing list