[compiler-rt] r242003 - sanitizer_common: Only use _ReadWriteBarrier when targeting MSVC cl.exe.
David Majnemer
david.majnemer at gmail.com
Sun Jul 12 20:45:00 PDT 2015
Doesn't this mean that our implementation of _ReadWriteBarrier isn't
compatible? What if it was implemented as __atomic_signal_fence(5)?
On Sun, Jul 12, 2015 at 5:26 PM, Peter Collingbourne <peter at pcc.me.uk>
wrote:
> Author: pcc
> Date: Sun Jul 12 19:26:04 2015
> New Revision: 242003
>
> URL: http://llvm.org/viewvc/llvm-project?rev=242003&view=rev
> Log:
> sanitizer_common: Only use _ReadWriteBarrier when targeting MSVC cl.exe.
>
> Fixes check-ubsan when self hosting on Windows.
>
> Modified:
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h?rev=242003&r1=242002&r2=242003&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Sun Jul 12
> 19:26:04 2015
> @@ -661,7 +661,7 @@ void MaybeStartBackgroudThread();
> // compiler from recognising it and turning it into an actual call to
> // memset/memcpy/etc.
> static inline void SanitizerBreakOptimization(void *arg) {
> -#if _MSC_VER
> +#if _MSC_VER && !defined(__clang__)
> _ReadWriteBarrier();
> #else
> __asm__ __volatile__("" : : "r" (arg) : "memory");
>
>
> _______________________________________________
> 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/20150712/a694755e/attachment.html>
More information about the llvm-commits
mailing list