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

Re: [Xen-devel] xen-unstable stubdom build-failure when debug=n



On 07/21/2014 01:43 PM, Olaf Hering wrote:
On Mon, Jul 21, Ian Campbell wrote:

tpm_tis.c:618:71: error: array subscript is below array bounds 
[-Werror=array-bounds]

Line 618 does appear to include the use of a signed variable as an array
offset, but I'm not sure how or why gcc is proving that it is negative.

It can not prove that tpm->locality remains positive.

Olaf

In that case, shouldn't the error be phrased less severely (something like 
"might be
below array bounds")?  Anyway, the actual value is checked by locality_enabled
prior to the array access, and that check is effectively (0x1F & (1 << 
locality)),
limiting the actual value to 0..4.  I can't reproduce the warning with my 
version
of GCC, so I'm only looking at the code, but it looks like GCC is being overly
conservative after not detecting the range limit and this is just a false 
positive.

--
Daniel De Graaf
National Security Agency

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.