|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Build problems in kdd.c with xen-4.14.0-rc4
On Fri, Jul 03, 2020 at 07:54:57PM +0100, Tim Deegan wrote:
> Hi Michael,
>
> Thanks for ther report!
>
> At 23:21 +0100 on 30 Jun (1593559296), Michael Young wrote:
> > I get the following errors when trying to build xen-4.14.0-rc4
> >
> > kdd.c: In function 'kdd_tx':
> > kdd.c:754:15: error: array subscript 16 is above array bounds of
> > 'uint8_t[16]' {aka 'unsigned char[16]'} [-Werror=array-bounds]
> > 754 | s->txb[len++] = 0xaa;
> > | ~~~~~~^~~~~~~
> > kdd.c:82:17: note: while referencing 'txb'
> > 82 | uint8_t txb[sizeof (kdd_hdr)]; /* Marshalling
> > area for tx */
> > | ^~~
> > kdd.c: In function 'kdd_break':
> > kdd.c:819:19: error: array subscript 16 is above array bounds of
> > 'uint8_t[16]' {aka 'unsigned char[16]'} [-Werror=array-bounds]
>
> Oh dear. The fix for the last kdd bug seems to have gone wrong
> somewhere. The patch I posted has:
>
> - uint8_t txb[sizeof (kdd_hdr) + 65536]; /* Marshalling area for tx
> */
> + uint8_t txb[sizeof (kdd_pkt)]; /* Marshalling area for tx
> */
>
> but as applied in master it's:
>
> - uint8_t txb[sizeof (kdd_hdr) + 65536]; /* Marshalling area for tx
> */
> + uint8_t txb[sizeof (kdd_hdr)]; /* Marshalling area for tx
> */
>
> i.e. the marshalling area is only large enough for a header and GCC
> is correctly complaining about that.
>
> Wei, it looks like you committed this patch - can you figure out what
> happened to it please?
>
My bad. The mail I saved did not apply cleanly so I manually recreated
your patch.
Thanks for letting me know. I will send a patch to fix the issue.
Wei.
> Cheers,
>
> Tim.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |