PageFaultHandler: Warning fix
This commit is contained in:
parent
2f460c1b79
commit
c88448ed93
|
@ -30,12 +30,6 @@
|
||||||
#include <mach/task.h>
|
#include <mach/task.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace PageFaultHandler {
|
|
||||||
static std::recursive_mutex s_exception_handler_mutex;
|
|
||||||
static bool s_in_exception_handler = false;
|
|
||||||
static bool s_installed = false;
|
|
||||||
} // namespace PageFaultHandler
|
|
||||||
|
|
||||||
#if defined(CPU_ARCH_ARM64)
|
#if defined(CPU_ARCH_ARM64)
|
||||||
[[maybe_unused]] static bool IsStoreInstruction(const void* ptr)
|
[[maybe_unused]] static bool IsStoreInstruction(const void* ptr)
|
||||||
{
|
{
|
||||||
|
@ -85,7 +79,11 @@ static bool s_installed = false;
|
||||||
|
|
||||||
namespace PageFaultHandler {
|
namespace PageFaultHandler {
|
||||||
static LONG ExceptionHandler(PEXCEPTION_POINTERS exi);
|
static LONG ExceptionHandler(PEXCEPTION_POINTERS exi);
|
||||||
}
|
|
||||||
|
static std::recursive_mutex s_exception_handler_mutex;
|
||||||
|
static bool s_in_exception_handler = false;
|
||||||
|
static bool s_installed = false;
|
||||||
|
} // namespace PageFaultHandler
|
||||||
|
|
||||||
LONG PageFaultHandler::ExceptionHandler(PEXCEPTION_POINTERS exi)
|
LONG PageFaultHandler::ExceptionHandler(PEXCEPTION_POINTERS exi)
|
||||||
{
|
{
|
||||||
|
@ -140,6 +138,10 @@ bool PageFaultHandler::Install(Error* error)
|
||||||
|
|
||||||
namespace PageFaultHandler {
|
namespace PageFaultHandler {
|
||||||
static void SignalHandler(int sig, siginfo_t* info, void* ctx);
|
static void SignalHandler(int sig, siginfo_t* info, void* ctx);
|
||||||
|
|
||||||
|
static std::recursive_mutex s_exception_handler_mutex;
|
||||||
|
static bool s_in_exception_handler = false;
|
||||||
|
static bool s_installed = false;
|
||||||
} // namespace PageFaultHandler
|
} // namespace PageFaultHandler
|
||||||
|
|
||||||
void PageFaultHandler::SignalHandler(int sig, siginfo_t* info, void* ctx)
|
void PageFaultHandler::SignalHandler(int sig, siginfo_t* info, void* ctx)
|
||||||
|
@ -210,7 +212,7 @@ void PageFaultHandler::SignalHandler(int sig, siginfo_t* info, void* ctx)
|
||||||
result = HandlePageFault(exception_pc, exception_address, is_write);
|
result = HandlePageFault(exception_pc, exception_address, is_write);
|
||||||
s_in_exception_handler = false;
|
s_in_exception_handler = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_exception_handler_mutex.unlock();
|
s_exception_handler_mutex.unlock();
|
||||||
|
|
||||||
// Resumes execution right where we left off (re-executes instruction that caused the SIGSEGV).
|
// Resumes execution right where we left off (re-executes instruction that caused the SIGSEGV).
|
||||||
|
|
Loading…
Reference in New Issue