From: Thomas Huth Date: Sat, 26 Mar 2022 15:11:47 +0000 (+0100) Subject: Fix endlessly growing try/catch stack when returning from run-loop X-Git-Tag: 41000~233^2 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=c9d107113bd3d0ab571663597f40b450d4e9d6c7;p=francis%2Fwinuae.git Fix endlessly growing try/catch stack when returning from run-loop ... for the C implementations of this code (i.e. Hatari and Previous), where STOPTRY has to be used before returning from within a TRY-CATCH block. --- diff --git a/newcpu.cpp b/newcpu.cpp index ab30081a..f7c79510 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5537,8 +5537,10 @@ static void m68k_run_mmu040 (void) regs.instruction_cnt++; if (regs.spcflags) { - if (do_specialties (cpu_cycles)) + if (do_specialties(cpu_cycles)) { + STOPTRY; return; + } } } } CATCH (prb) { @@ -5652,8 +5654,10 @@ insretry: cpu_cycles = adjust_cycles (cpu_cycles); regs.instruction_cnt++; if (regs.spcflags) { - if (do_specialties (cpu_cycles)) + if (do_specialties(cpu_cycles)) { + STOPTRY; return; + } } } else { @@ -5661,8 +5665,10 @@ insretry: regs.instruction_cnt++; regs.ipl = regs.ipl_pin; if (regs.spcflags || time_for_interrupt ()) { - if (do_specialties (0)) + if (do_specialties(0)) { + STOPTRY; return; + } } }