mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-24 17:25:36 +00:00
fc30b3d5cf
Two or more threads might race while invalidating the same TB. We currently do not check for this at all despite taking tb_lock, which means we would wrongly invalidate the same TB more than once. This bug has actually been hit by users: I recently saw a report on IRC, although I have yet to see the corresponding test case. Fix this by using qht_remove as the synchronization point; if it fails, that means the TB has already been invalidated, and therefore there is nothing left to do in tb_phys_invalidate. Note that this solution works now that we still have tb_lock, and will continue working once we remove tb_lock. Backports commit cc689485ee3e9dca05765326ee8fd619a6ec48f0 from qemu |
||
---|---|---|
.. | ||
atomic_template.h | ||
cpu-exec-common.c | ||
cpu-exec.c | ||
cputlb.c | ||
Makefile.objs | ||
softmmu_template.h | ||
tcg-runtime-gvec.c | ||
tcg-runtime.c | ||
tcg-runtime.h | ||
translate-all.c | ||
translate-all.h | ||
translate-common.c | ||
translator.c |