From 44b3c9be6e0528928386fefb4119fee129404838 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 22 Nov 2020 14:49:49 +1000 Subject: [PATCH] Common/PageFaultHandler: Fix for Windows/ARM64 --- src/common/page_fault_handler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/page_fault_handler.cpp b/src/common/page_fault_handler.cpp index e94eff8ce..2d682b26a 100644 --- a/src/common/page_fault_handler.cpp +++ b/src/common/page_fault_handler.cpp @@ -68,7 +68,7 @@ static bool IsStoreInstruction(const void* ptr) } #endif -#if defined(WIN32) && defined(CPU_X64) +#if defined(WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64)) static PVOID s_veh_handle; static LONG ExceptionHandler(PEXCEPTION_POINTERS exi) @@ -190,7 +190,7 @@ bool InstallHandler(void* owner, Callback callback) if (was_empty) { -#if defined(WIN32) && defined(CPU_X64) +#if defined(WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64)) s_veh_handle = AddVectoredExceptionHandler(1, ExceptionHandler); if (!s_veh_handle) { @@ -247,7 +247,7 @@ bool RemoveHandler(void* owner) if (m_handlers.empty()) { -#if defined(WIN32) && defined(CPU_X64) +#if defined(WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64)) RemoveVectoredExceptionHandler(s_veh_handle); s_veh_handle = nullptr; #elif defined(USE_SIGSEGV)