null pointer dereference in tcg_emit_op
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am insert a custom tcg helper function in i386_tr_insn_start for trace the instructions.
most of time the qemu runed ok ,but when execute some special software will lead to crash.
the below is the insert code:
=======
8514 static void i386_tr_
8515 {
8516 DisasContext *dc = container_
8517 TCGv_ptr ptr= tcg_const_
8518 gen_helper_
8519 tcg_gen_
8520 }
=======
below is the callstack
#0 0x000055555581df5e in tcg_emit_op (opc=opc@
#1 0x0000555555825911 in tcg_gen_op2 (opc=opc@
#2 0x000055555581d713 in tcg_const_i64 (opc=INDEX_
#3 0x000055555581d713 in tcg_const_i64 (arg=792, ret=<optimized out>) at /root/qemu/
#4 0x000055555581d713 in tcg_const_i64 (val=val@entry=792) at /root/qemu/
#5 0x000055555582732d in tcg_gen_addi_i64 (ret=0xd18, arg1=0x378, arg2=arg2@
#6 0x000055555590ffaf in gen_sse (b=792, a=<optimized out>, r=<optimized out>) at /root/qemu/
#7 0x000055555590ffaf in gen_sse (env=env@
#8 0x0000555555911d7f in disas_insn (s=s@entry=
#9 0x00005555559207a0 in i386_tr_
#10 0x0000555555892649 in translator_loop (ops=0x55555622dee0 <i386_tr_ops>, db=0x7fffea99a610, cpu=0x55555673a220, tb=<optimized out>) at /root/qemu/
#11 0x00005555559209ef in gen_intermediat
#12 0x0000555555891437 in tb_gen_code (cpu=cpu@
#13 0x000055555588f97b in cpu_exec (cf_mask=0, tb_exit=0, last_tb=0x0, cpu=0x0) at /root/qemu/
#14 0x000055555588f97b in cpu_exec (cpu=cpu@
#15 0x000055555584b152 in tcg_cpu_exec (cpu=0x55555673
#16 0x000055555584d1b8 in qemu_tcg_
#17 0x00007ffff2585e25 in start_thread () at /lib64/
#18 0x00007ffff22afbad in clone () at /lib64/libc.so.6
Changed in qemu: | |
status: | New → In Progress |
summary: |
- pointer dereference in tcg_emit_op + null pointer dereference in tcg_emit_op |
Does this bug occur with a normal build of QEMU or only with your changes to it?