diff options
author | Reid Kleckner <rnk@google.com> | 2018-05-30 21:21:18 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-05-30 21:21:18 +0000 |
commit | ae960e3cf76fbee7d18b428572d162a643036c0e (patch) | |
tree | 71fdf1e5c46477a92710eabad3dbc091ff89bb41 /lib/asan/asan_win.cc | |
parent | 2c46c48c25d3ca0588f0dcf54464921b18213ce1 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_win.cc')
-rw-r--r-- | lib/asan/asan_win.cc | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/asan/asan_win.cc b/lib/asan/asan_win.cc index ad32118db..67125d38a 100644 --- a/lib/asan/asan_win.cc +++ b/lib/asan/asan_win.cc @@ -265,11 +265,6 @@ ShadowExceptionHandler(PEXCEPTION_POINTERS exception_pointers) { // 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); |