}
          sysbus_mmio_map(SYS_BUS_DEVICE(&s->ioexp[i]), 0,
                          sc->memmap[ASPEED_DEV_LTPI_IO0 + i]);
+
+        icio = ASPEED_INTC_GET_CLASS(&a->intc[2 + i]);

I'm seeing this fail qtest locally:
runtime error: index 3 out of bounds for type 'AspeedINTCState[2]'
(aka 'struct AspeedINTCState[2]')
Presumably, it's because even though we use `ASPEED_INTC_NUM` to declare
soc->intc, it's only declaring 2 of them. Should we declare more controllers in
intc?

Thanks,
Nabih

The correct code segment should be:
     icio = ASPEED_INTC_GET_CLASS(&a->intcioexp[i]);

Thank you for pointing this out. I will update the fix in the next patch.
Compiling with clang also detects the problem. I merged your fix in
my branch and the rest seems fine. Please wait a bit before resending.

Thanks,

C.

Reply via email to