qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 4/4] xilinx_zynq: machine model initial versi


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v9 4/4] xilinx_zynq: machine model initial version
Date: Thu, 08 Mar 2012 10:42:59 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

On 03/04/2012 10:39 PM, Peter A. G. Crosthwaite wrote:
Xilinx zynq-7000 machine model. Also includes device model for the zynq-specific
system level control register (SLCR) module.

Signed-off-by: Peter A. G. Crosthwaite<address@hidden>
Acked-by: Edgar E. Iglesias<address@hidden>

This breaks the build for me:

cc1: warnings being treated as errors
/home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_read’:
/home/anthony/git/qemu/hw/zynq_slcr.c:314:25: error: array subscript is above array bounds
/home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_write’:
/home/anthony/git/qemu/hw/zynq_slcr.c:457:22: error: array subscript is above array bounds
make[1]: *** [zynq_slcr.o] Error 1


+        case 0xA60 ... 0xA8C:
+            s->afi[0][(offset - 0x700) / 4] = val;
+            break;

And GCC is definitely right here. This will pretty clearly overflow the array if offset is any of the allowable values per the switch statement.

Regards,

Anthony Liguori



reply via email to

[Prev in Thread] Current Thread [Next in Thread]