mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-05 01:38:55 +02:00
Protect against stack overflow caused by deep recursive calls
* PPTC version bump * Also reset call depth when not using the unmanaged dispatch loop * Increment call depth on function start rather than before call
This commit is contained in:
@@ -186,6 +186,7 @@ namespace ARMeilleure.Translation
|
||||
|
||||
Statistics.StartTimer();
|
||||
|
||||
context.ResetCallDepth();
|
||||
ulong nextAddr = func.Execute(Stubs.ContextWrapper, context);
|
||||
|
||||
Statistics.StopTimer(address);
|
||||
@@ -260,6 +261,7 @@ namespace ARMeilleure.Translation
|
||||
|
||||
Logger.StartPass(PassName.Translation);
|
||||
|
||||
InstEmitFlowHelper.EmitCallDepthCheckAndIncrement(context, Const(address));
|
||||
EmitSynchronization(context);
|
||||
|
||||
if (blocks[0].Address != address)
|
||||
|
||||
Reference in New Issue
Block a user