From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Olaf Hering <olaf@aepfle.de>, Ian Campbell <Ian.Campbell@citrix.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>,
stefano.stabellini@eu.citrix.com, xen-devel@lists.xenproject.org
Subject: Re: xen-unstable stubdom build-failure when debug=n
Date: Mon, 21 Jul 2014 14:13:25 -0400 [thread overview]
Message-ID: <53CD5845.9090400@tycho.nsa.gov> (raw)
In-Reply-To: <20140721174327.GA5544@aepfle.de>
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
next prev parent reply other threads:[~2014-07-21 18:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 8:27 xen-unstable stubdom build-failure when debug=n Sander Eikelenboom
2014-07-17 14:13 ` Ian Campbell
2014-07-17 14:25 ` Sander Eikelenboom
2014-07-21 16:13 ` Ian Campbell
2014-07-21 16:21 ` Olaf Hering
2014-07-21 16:27 ` Ian Campbell
2014-07-22 7:09 ` Olaf Hering
2014-07-21 16:31 ` Olaf Hering
2014-07-21 16:43 ` Olaf Hering
2014-07-21 16:48 ` Ian Campbell
2014-07-21 16:51 ` Olaf Hering
2014-07-21 16:24 ` Ian Campbell
2014-07-21 17:43 ` Olaf Hering
2014-07-21 18:13 ` Daniel De Graaf [this message]
2014-07-22 6:13 ` Olaf Hering
2014-07-22 7:11 ` Sander Eikelenboom
2014-07-26 15:14 ` Sander Eikelenboom
2014-07-28 9:09 ` Ian Campbell
2014-07-28 9:47 ` Sander Eikelenboom
2014-07-28 9:51 ` Ian Campbell
2014-07-28 9:55 ` Olaf Hering
2014-07-28 9:22 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53CD5845.9090400@tycho.nsa.gov \
--to=dgdegra@tycho.nsa.gov \
--cc=Ian.Campbell@citrix.com \
--cc=linux@eikelenboom.it \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).