plctlab / plct-qemu

PLCT实验室维护的QEMU仓库。代码放在 plct- 前缀的分支里。
http://www.qemu.org
Other
26 stars 13 forks source link

API misuse in instruction translation #10

Closed Phantom1003 closed 3 years ago

Phantom1003 commented 3 years ago

In K set extension implement, when translate instruction, you'd better not directly using elements in cpu_gpr, because cpu_gpr[0] is not actually allocated, using gen_get_gpr instead This code will trigger a segment fault when source register is $zero https://github.com/isrc-cas/plct-qemu/blob/plct-k-dev/target/riscv/insn_trans/trans_rvk.c.inc#L65

liweiwei90 commented 3 years ago

@Phantom1003 Thanks for your suggestion. This bug have been fixed when Lucas rebased to support v0.9.2.