From e9b550de3a30a7f00c7547b71e7c850181fd9493 Mon Sep 17 00:00:00 2001 From: Merry Date: Thu, 14 Jul 2022 12:29:47 +0100 Subject: [PATCH] fuzz_arm: Correct unicorn overrun recovery code --- tests/A32/fuzz_arm.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/A32/fuzz_arm.cpp b/tests/A32/fuzz_arm.cpp index bd53af15..0cd19175 100644 --- a/tests/A32/fuzz_arm.cpp +++ b/tests/A32/fuzz_arm.cpp @@ -398,9 +398,8 @@ static void RunTestInstance(Dynarmic::A32::Jit& jit, } if (uni.GetRegisters()[15] > jit.Regs()[15]) { - const u32 final_pc = jit.Regs()[15]; int trials = 0; - while (final_pc >= initial_pc && final_pc < expected_end_pc && trials++ < 100) { + while (jit.Regs()[15] >= initial_pc && jit.Regs()[15] < expected_end_pc && trials++ < 100 && uni.GetRegisters()[15] != jit.Regs()[15]) { fmt::print("Warning: Possible unicorn overrrun, attempt recovery\n"); jit.Step(); }