diff --git a/compiler-rt/lib/asan/asan_win.cpp b/compiler-rt/lib/asan/asan_win.cpp --- a/compiler-rt/lib/asan/asan_win.cpp +++ b/compiler-rt/lib/asan/asan_win.cpp @@ -194,9 +194,12 @@ } void FlushUnneededASanShadowMemory(uptr p, uptr size) { + // Only asan on 64-bit Windows supports committing shadow memory on demand. +#if SANITIZER_WINDOWS64 // Since asan's mapping is compacting, the shadow chunk may be // not page-aligned, so we only flush the page-aligned portion. ReleaseMemoryPagesToOS(MemToShadow(p), MemToShadow(p + size)); +#endif } // ---------------------- TSD ---------------- {{{