[compiler-rt] r195624 - [ASan] Un-break the Windows build
Reid Kleckner
rnk at google.com
Mon Nov 25 10:33:36 PST 2013
On Sun, Nov 24, 2013 at 11:54 PM, Timur Iskhodzhanov <timurrrr at google.com>wrote:
> Author: timurrrr
> Date: Mon Nov 25 01:54:55 2013
> New Revision: 195624
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_libc.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_libc.cc?rev=195624&r1=195623&r2=195624&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_libc.cc (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_libc.cc Mon Nov 25
> 01:54:55 2013
> @@ -18,7 +18,12 @@ namespace __sanitizer {
>
> // Make the compiler think that something is going on there.
> static inline void break_optimization(void *arg) {
> +#ifdef SANITIZER_WINDOWS
> + // FIXME: make sure this is actually enough.
>
I believe _ReadWriteBarrier is what you want:
http://msdn.microsoft.com/en-us/library/f20w0x5e(v=vs.120).aspx
It's deprecated because people think it emits fence instructions, but it
only prevents compiler reordering. That's exactly what you want in this
case.
> + __asm;
> +#else
> __asm__ __volatile__("" : : "r" (arg) : "memory");
> +#endif
> }
>
> s64 internal_atoll(const char *nptr) {
>
>
> _______________________________________________
> 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/20131125/a32ed61d/attachment.html>
More information about the llvm-commits
mailing list