Fix for pcrel system archs
This commit is contained in:
parent
ae9b1d73dd
commit
9302a3a817
@ -1045,24 +1045,19 @@ cpu_exec_loop(CPUState *cpu, SyncClocks *sc)
|
|||||||
|
|
||||||
//// --- Begin LibAFL code ---
|
//// --- Begin LibAFL code ---
|
||||||
|
|
||||||
if (cflags & CF_PCREL) {
|
if (last_tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) {
|
||||||
// No party with PCREL
|
mmap_lock();
|
||||||
tb_add_jump(last_tb, tb_exit, tb);
|
TranslationBlock *edge = libafl_gen_edge(cpu, last_tb_pc, pc, tb_exit, cs_base, flags, cflags);
|
||||||
} else {
|
mmap_unlock();
|
||||||
if (last_tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) {
|
|
||||||
mmap_lock();
|
|
||||||
TranslationBlock *edge = libafl_gen_edge(cpu, last_tb_pc, pc, tb_exit, cs_base, flags, cflags);
|
|
||||||
mmap_unlock();
|
|
||||||
|
|
||||||
if (edge) {
|
if (edge) {
|
||||||
tb_add_jump(last_tb, tb_exit, edge);
|
tb_add_jump(last_tb, tb_exit, edge);
|
||||||
tb_add_jump(edge, 0, tb);
|
tb_add_jump(edge, 0, tb);
|
||||||
} else {
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
tb_add_jump(last_tb, tb_exit, tb);
|
||||||
}
|
}
|
||||||
|
|
||||||
//// --- End LibAFL code ---
|
//// --- End LibAFL code ---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user