Fix tb->icount > TCG_MAX_INSNS for edges
Aparently tcg_tb_alloc does not return a 0ed field, which can cause icount to appear to have a value above the maximum allowed number of instructions per tb.
This commit is contained in:
parent
e97deaae59
commit
0520e858eb
@ -1792,6 +1792,7 @@ TranslationBlock *libafl_gen_edge(CPUState *cpu, target_ulong src_block,
|
|||||||
tb->flags = flags;
|
tb->flags = flags;
|
||||||
tb->cflags = cflags;
|
tb->cflags = cflags;
|
||||||
tb->trace_vcpu_dstate = *cpu->trace_dstate;
|
tb->trace_vcpu_dstate = *cpu->trace_dstate;
|
||||||
|
tb->icount = 0;
|
||||||
tcg_ctx->tb_cflags = 0;
|
tcg_ctx->tb_cflags = 0;
|
||||||
|
|
||||||
tcg_func_start(tcg_ctx);
|
tcg_func_start(tcg_ctx);
|
||||||
@ -1912,6 +1913,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
|||||||
tb->flags = flags;
|
tb->flags = flags;
|
||||||
tb->cflags = cflags;
|
tb->cflags = cflags;
|
||||||
tb->trace_vcpu_dstate = *cpu->trace_dstate;
|
tb->trace_vcpu_dstate = *cpu->trace_dstate;
|
||||||
|
tb->icount = 0;
|
||||||
tcg_ctx->tb_cflags = cflags;
|
tcg_ctx->tb_cflags = cflags;
|
||||||
tb_overflow:
|
tb_overflow:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user