From f6658cbb58b040c4239bc7530c226d48e039a4f6 Mon Sep 17 00:00:00 2001 From: Theodore Dubois Date: Thu, 30 Aug 2018 00:14:43 +0000 Subject: [PATCH] Fix unicornomatic failures related to undefined flags --- tools/unicornomatic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/unicornomatic.c b/tools/unicornomatic.c index 29d7839a..caa25d9c 100644 --- a/tools/unicornomatic.c +++ b/tools/unicornomatic.c @@ -92,6 +92,8 @@ int compare_cpus(struct cpu_state *cpu, struct tlb *tlb, uc_engine *uc, int unde debugger; return -1; } + // sync up the flags so undefined flags won't error out next time + uc_trycall(uc_reg_write(uc, UC_X86_REG_EFLAGS, ®s.eflags), "sync flags"); // compare pages marked dirty if (tlb->dirty_page != TLB_PAGE_EMPTY) {