PatchEngine/GeckoCode: Heuristic stack checks
Try to make sure the stack is sane before calling into the codehandler. This is intended to reduce the possibility of random memory corruption.
This commit is contained in:
1 parent
31cf8432bf
commit
b3547870ee
5 files changed
+78
-49
No files matched your search
@@ -483,9 +483,8 @@ bool CBoot::BootUp()
|
||||
// Not part of the binary itself, but either we or Gecko OS might insert
|
||||
// this, and it doesn't clear the icache properly.
|
||||
HLE::Patch(Gecko::ENTRY_POINT, "GeckoCodehandler");
|
||||
if (SConfig::GetInstance().bEnableCheats)
|
||||
{
|
||||
HLE::Patch(Gecko::HLE_TRAMPOLINE_ADDRESS, "GeckoHandlerReturnTrampoline");
|
||||
}
|
||||
// This has to always be installed even if cheats are not enabled because of the possiblity of
|
||||
// loading a savestate where PC is inside the code handler while cheats are disabled.
|
||||
HLE::Patch(Gecko::HLE_TRAMPOLINE_ADDRESS, "GeckoHandlerReturnTrampoline");
|
||||
return true;
|
||||
}
|
||||
@@ -178,10 +178,6 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader)
|
||||
// Load patches
|
||||
PatchEngine::LoadPatches();
|
||||
|
||||
// If we have any patches that need to be applied very early, here's a good place
|
||||
bool patched = PatchEngine::ApplyFramePatches();
|
||||
_assert_(patched);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user