[PATCH] D149025: [sanitizer][asan][win] Only unmap unneeded shadow memory on x86_64
Alvin Wong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 09:23:27 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0d5b51e0ac88: [sanitizer][asan][win] Only unmap unneeded shadow memory on x86_64 (authored by alvinhochun).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149025/new/
https://reviews.llvm.org/D149025
Files:
compiler-rt/lib/asan/asan_win.cpp
Index: compiler-rt/lib/asan/asan_win.cpp
===================================================================
--- compiler-rt/lib/asan/asan_win.cpp
+++ 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 ---------------- {{{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149025.518768.patch
Type: text/x-patch
Size: 636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230502/afc9d06a/attachment.bin>
More information about the llvm-commits
mailing list