Merge pull request #43 from cube0x8/direct_jmp_no_instr

Avoid instrumentation for direct jump
This commit is contained in:
Andrea Fioraldi 2024-01-12 16:15:11 +01:00 committed by GitHub
commit 99ea52d123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1069,7 +1069,7 @@ cpu_exec_loop(CPUState *cpu, SyncClocks *sc)
if (last_tb) { if (last_tb) {
// tb_add_jump(last_tb, tb_exit, tb); // tb_add_jump(last_tb, tb_exit, tb);
//if (last_tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) { if (last_tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) {
mmap_lock(); mmap_lock();
edge = libafl_gen_edge(cpu, last_tb->pc, pc, tb_exit, cs_base, flags, cflags); edge = libafl_gen_edge(cpu, last_tb->pc, pc, tb_exit, cs_base, flags, cflags);
mmap_unlock(); mmap_unlock();
@ -1081,9 +1081,9 @@ cpu_exec_loop(CPUState *cpu, SyncClocks *sc)
} else { } else {
tb_add_jump(last_tb, tb_exit, tb); tb_add_jump(last_tb, tb_exit, tb);
} }
/*} else { } else {
tb_add_jump(last_tb, tb_exit, tb); tb_add_jump(last_tb, tb_exit, tb);
}*/ }
} }
if (has_libafl_edge) { if (has_libafl_edge) {