From 121af75b1536ebfbb74a9c6c99d1a7a0ea90671b Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 10 Dec 2024 13:54:27 -0800 Subject: [PATCH] ThreadManager: Store off the syscallHandler --- Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp | 2 +- Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp index ac3c8fe781..d1161802a0 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp @@ -744,7 +744,7 @@ void SyscallHandler::DefaultProgramBreak(uint64_t Base, uint64_t Size) { } SyscallHandler::SyscallHandler(FEXCore::Context::Context* _CTX, FEX::HLE::SignalDelegator* _SignalDelegation, FEX::HLE::ThunkHandler* ThunkHandler) - : TM {_CTX, _SignalDelegation} + : TM {_CTX, this, _SignalDelegation} , SeccompEmulator {this, _SignalDelegation} , FM {_CTX} , CTX {_CTX} diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h b/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h index 9060702110..33b0de0064 100644 --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/ThreadManager.h @@ -98,8 +98,9 @@ struct ThreadStateObject : public FEXCore::Allocator::FEXAllocOperators { class ThreadManager final { public: - ThreadManager(FEXCore::Context::Context* CTX, FEX::HLE::SignalDelegator* SignalDelegation) + ThreadManager(FEXCore::Context::Context* CTX, FEX::HLE::SyscallHandler* SyscallHandler, FEX::HLE::SignalDelegator* SignalDelegation) : CTX {CTX} + , SyscallHandler {SyscallHandler} , SignalDelegation {SignalDelegation} {} ~ThreadManager(); @@ -174,6 +175,7 @@ class ThreadManager final { private: FEXCore::Context::Context* CTX; + FEX::HLE::SyscallHandler* SyscallHandler; FEX::HLE::SignalDelegator* SignalDelegation; FEXCore::ForkableUniqueMutex ThreadCreationMutex;