Thread (3 messages) 3 messages, 2 authors, 2015-02-20

Re: drivers/net/ethernet/broadcom/tg3.c:17811:37: warning: array subscript is above array bounds

From: Fengguang Wu <hidden>
Date: 2015-02-20 01:16:40

Hi Andrey,

On Thu, Feb 19, 2015 at 06:39:28PM +0300, Andrey Ryabinin wrote:
On 02/18/2015 08:14 PM, kbuild test robot wrote:
quoted
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f5af19d10d151c5a2afae3306578f485c244db25
commit: ef7f0d6a6ca8c9e4b27d78895af86c2fbfaeedb2 x86_64: add KASan support
date:   5 days ago
config: x86_64-randconfig-iv1-02190055 (attached as .config)
reproduce:
  git checkout ef7f0d6a6ca8c9e4b27d78895af86c2fbfaeedb2
  # save the attached .config to linux build tree
  make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.

All warnings:

   drivers/net/ethernet/broadcom/tg3.c: In function 'tg3_init_one':
quoted
quoted
drivers/net/ethernet/broadcom/tg3.c:17811:37: warning: array subscript is above array bounds [-Warray-bounds]
      struct tg3_napi *tnapi = &tp->napi[i];
                                        ^
quoted
quoted
drivers/net/ethernet/broadcom/tg3.c:17811:37: warning: array subscript is above array bounds [-Warray-bounds]
This probably a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124
I see this warning with 4.9.2, but not with GCC 5 where this should be fixed already.
Yes we are running gcc 4.9.2. Thank you for the info, I'll disable this warning for now.

Regards,
Fengguang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help