[compiler-rt] r203778 - Disable fast shadow zero'ing on Windows
Timur Iskhodzhanov
timurrrr at google.com
Thu Mar 13 03:15:10 PDT 2014
Author: timurrrr
Date: Thu Mar 13 05:15:10 2014
New Revision: 203778
URL: http://llvm.org/viewvc/llvm-project?rev=203778&view=rev
Log:
Disable fast shadow zero'ing on Windows
Modified:
compiler-rt/trunk/lib/asan/asan_poisoning.h
Modified: compiler-rt/trunk/lib/asan/asan_poisoning.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_poisoning.h?rev=203778&r1=203777&r2=203778&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_poisoning.h (original)
+++ compiler-rt/trunk/lib/asan/asan_poisoning.h Thu Mar 13 05:15:10 2014
@@ -39,7 +39,12 @@ ALWAYS_INLINE void FastPoisonShadow(uptr
uptr shadow_beg = MEM_TO_SHADOW(aligned_beg);
uptr shadow_end = MEM_TO_SHADOW(
aligned_beg + aligned_size - SHADOW_GRANULARITY) + 1;
+ // FIXME: Page states are different on Windows, so using the same interface
+ // for mapping shadow and zeroing out pages doesn't "just work", so we should
+ // probably provide higher-level interface for these operations.
+ // For now, just memset on Windows.
if (value ||
+ SANITIZER_WINDOWS ||
shadow_end - shadow_beg < common_flags()->clear_shadow_mmap_threshold) {
REAL(memset)((void*)shadow_beg, value, shadow_end - shadow_beg);
} else {
More information about the llvm-commits
mailing list