[compiler-rt] r333595 - [asan] Remove unneeded VirtualQuery from exception handler
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed May 30 14:21:18 PDT 2018
Author: rnk
Date: Wed May 30 14:21:18 2018
New Revision: 333595
URL: http://llvm.org/viewvc/llvm-project?rev=333595&view=rev
Log:
[asan] Remove unneeded VirtualQuery from exception handler
We don't use the result of the query, and all tests pass if I remove it.
During startup, ASan spends a fair amount of time in this handler, and
the query is much more expensive than the call to commit the memory.
Modified:
compiler-rt/trunk/lib/asan/asan_win.cc
Modified: compiler-rt/trunk/lib/asan/asan_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_win.cc?rev=333595&r1=333594&r2=333595&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_win.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_win.cc Wed May 30 14:21:18 2018
@@ -265,11 +265,6 @@ ShadowExceptionHandler(PEXCEPTION_POINTE
// Determine the address of the page that is being accessed.
uptr page = RoundDownTo(addr, page_size);
- // Query the existing page.
- MEMORY_BASIC_INFORMATION mem_info = {};
- if (::VirtualQuery((LPVOID)page, &mem_info, sizeof(mem_info)) == 0)
- return EXCEPTION_CONTINUE_SEARCH;
-
// Commit the page.
uptr result =
(uptr)::VirtualAlloc((LPVOID)page, page_size, MEM_COMMIT, PAGE_READWRITE);
More information about the llvm-commits
mailing list