From dc3e70c5525b3fea309bcdea29b659e7a996337a Mon Sep 17 00:00:00 2001 From: merry Date: Sun, 27 Feb 2022 19:51:06 +0000 Subject: [PATCH] fuzz_arm: Sometimes we have to step more to sync up with unicorn This happens if unicorn happens to jump back on an IT instruction. --- tests/A32/fuzz_arm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/A32/fuzz_arm.cpp b/tests/A32/fuzz_arm.cpp index dcbc5b13..c36e99c9 100644 --- a/tests/A32/fuzz_arm.cpp +++ b/tests/A32/fuzz_arm.cpp @@ -397,7 +397,8 @@ static void RunTestInstance(Dynarmic::A32::Jit& jit, if (uni.GetRegisters()[15] > jit.Regs()[15]) { const u32 final_pc = jit.Regs()[15]; - if (final_pc >= initial_pc && final_pc < expected_end_pc) { + int trials = 0; + while (final_pc >= initial_pc && final_pc < expected_end_pc && trials++ < 100) { fmt::print("Warning: Possible unicorn overrrun, attempt recovery\n"); jit.Step(); }