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 | b54ac414d103e8d3563f271fe9ed07f8f5d21455 (patch) | |
tree | 0931fc90121dbc8e060453d99961a07bd00543df | |
parent | 5b91350b4a572b6a6317f3907204d77d8c66d9b1 (diff) | |
download | bcm5719-llvm-b54ac414d103e8d3563f271fe9ed07f8f5d21455.tar.gz bcm5719-llvm-b54ac414d103e8d3563f271fe9ed07f8f5d21455.zip |
[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.
llvm-svn: 333595
-rw-r--r-- | compiler-rt/lib/asan/asan_win.cc | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/compiler-rt/lib/asan/asan_win.cc b/compiler-rt/lib/asan/asan_win.cc index ad32118db68..67125d38ad4 100644 --- a/compiler-rt/lib/asan/asan_win.cc +++ b/compiler-rt/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); |