Comment 5 for bug 1825359

Revision history for this message
Shahab Vahedi (shahab-vahedi) wrote :

I have to say, after applying this patch, my test still fails while fetching the instructions from this _small_ region. Although there is no MMU_DATA_LOAD anymore, a few iterations later (while guest code has just jumped to the beginning of the executable region), QEmu segfaults (call stack is attached):

memory.c
--------
static MemTxResult
memory_region_read_with_attrs_accessor(MemoryRegion *mr,
                                       ...)
{
    uint64_t tmp = 0;
    MemTxResult r;

    r = mr->ops->read_with_attrs(mr->opaque, addr, &tmp, size, attrs);
    ...
}
--------

Here, "read_with_attrs" is null. The call stack looks like:
---
#0 memory_region_read_with_attrs_accessor at memory.c:465
#1 access_with_adjusted_size at memory.c:568
#2 memory_region_dispatch_read1 at memory.c:1425
#3 memory_region_dispatch_read at memory.c:1446
#4 io_readx at accel/tcg/cputlb.c:909
#5 io_readw at accel/tcg/softmmu_template.h:106
#6 helper_le_ldw_cmmu at accel/tcg/softmmu_template.h:146
#7 cpu_lduw_code_ra at include/exec/cpu_ldst_template.h:102
#8 cpu_lduw_code at include/exec/cpu_ldst_template.h:114
#9 read_and_decode_context at target/arc/arc-decoder.c:1479
#10 arc_decode at target/arc/arc-decoder.c:1736
#11 decode_opc at target/arc/translate.c:313
#12 arc_tr_translate_insn at target/arc/translate.c:335
#13 translator_loop at accel/tcg/translator.c:107
#14 gen_intermediate_code at target/arc/translate.c:413
#15 tb_gen_code at accel/tcg/translate-all.c:1723
#16 tb_find at accel/tcg/cpu-exec.c:407
#17 cpu_exec at accel/tcg/cpu-exec.c:729
#18 tcg_cpu_exec at cpus.c:1430
---
more detailed call stack is attached.