Windows: Call the protection callback for executable FEX mappings

This commit is contained in:
Billy Laws committed 2025-04-19 14:09:48 +01:00
1 parent 0f0e969d8f
commit 1a2398d2ce
2 files changed
+3

No files matched your search

+2
View File
@@ -624,6 +624,8 @@ NTSTATUS ProcessInit() {
CPUFeatures.emplace(*CTX);
X64ReturnInstr = ::VirtualAlloc(nullptr, FEXCore::Utils::FEX_PAGE_SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
InvalidationTracker->HandleMemoryProtectionNotification(reinterpret_cast<uint64_t>(X64ReturnInstr), FEXCore::Utils::FEX_PAGE_SIZE,
PAGE_EXECUTE_READ);
*reinterpret_cast<uint8_t*>(X64ReturnInstr) = 0xc3;
const uintptr_t KiUserExceptionDispatcherFFS = reinterpret_cast<uintptr_t>(GetProcAddress(NtDll, "KiUserExceptionDispatcher"));