qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

target/xtensa: add FIXME for translation memory leak

Dynamically allocating a new structure within the DisasContext can
potentially leak as we can longjmp out of the translation loop (see
test_phys_mem). The proper fix would be to use static allocation
within the DisasContext but as the Xtensa translator imports it's code
from elsewhere I leave that as an exercise for the maintainer.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Message-Id: <20200403191150.863-6-alex.bennee@linaro.org>

+5
+5
target/xtensa/translate.c
··· 1174 1174 dc->callinc = ((tb_flags & XTENSA_TBFLAG_CALLINC_MASK) >> 1175 1175 XTENSA_TBFLAG_CALLINC_SHIFT); 1176 1176 1177 + /* 1178 + * FIXME: This will leak when a failed instruction load or similar 1179 + * event causes us to longjump out of the translation loop and 1180 + * hence not clean-up in xtensa_tr_tb_stop 1181 + */ 1177 1182 if (dc->config->isa) { 1178 1183 dc->insnbuf = xtensa_insnbuf_alloc(dc->config->isa); 1179 1184 dc->slotbuf = xtensa_insnbuf_alloc(dc->config->isa);