about summary refs log tree commit diff
path: root/qemu_mode/patches/afl-qemu-cpu-inl.h
diff options
context:
space:
mode:
authorKirin-say <kirin.say@gmail.com>2020-07-25 00:36:36 +0800
committerKirin-say <kirin.say@gmail.com>2020-07-25 00:36:36 +0800
commit89557d16077652c52df4244809a0e9c733a788cc (patch)
tree262ebc2f0a7e9db05aa483bff5d254f82fe786b3 /qemu_mode/patches/afl-qemu-cpu-inl.h
parent4a51cb71fb8785325dedac693cdea4648f6e5279 (diff)
downloadafl++-89557d16077652c52df4244809a0e9c733a788cc.tar.gz
fix bug in qemu mode
Diffstat (limited to 'qemu_mode/patches/afl-qemu-cpu-inl.h')
-rw-r--r--qemu_mode/patches/afl-qemu-cpu-inl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-inl.h b/qemu_mode/patches/afl-qemu-cpu-inl.h
index 5f579687..07da9324 100644
--- a/qemu_mode/patches/afl-qemu-cpu-inl.h
+++ b/qemu_mode/patches/afl-qemu-cpu-inl.h
@@ -620,7 +620,8 @@ static void afl_wait_tsl(CPUState *cpu, int fd) {
 
         last_tb = tb_htable_lookup(cpu, c.last_tb.pc, c.last_tb.cs_base,
                                    c.last_tb.flags, c.cf_mask);
-        if (last_tb) { tb_add_jump(last_tb, c.tb_exit, tb); }
+#define TB_JMP_RESET_OFFSET_INVALID 0xffff
+        if (last_tb && (last_tb->jmp_reset_offset[c.tb_exit] != TB_JMP_RESET_OFFSET_INVALID)) { tb_add_jump(last_tb, c.tb_exit, tb); }
 
       }