xfs-masters
[Top] [All Lists]

[xfs-masters] Re: 2.6.27: "array subscript is above array bounds" warnin

To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: [xfs-masters] Re: 2.6.27: "array subscript is above array bounds" warnings
From: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Oct 2008 11:00:06 -0400 (EDT)
Cc: Oliver Bock <bock@xxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <linux-acpi@xxxxxxxxxxxxxxx>, <xfs-masters@xxxxxxxxxxx>, <linux-usb@xxxxxxxxxxxxxxx>
In-reply-to: <20081017235046.f3c6c86e.akpm@xxxxxxxxxxxxxxxxxxxx>
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
On Fri, 17 Oct 2008, Andrew Morton wrote:

> (cc's added)
> 
> On Tue, 14 Oct 2008 22:17:36 +0200 Oliver Bock <bock@xxxxxxxxxxxxx> wrote:
> 
> > Hi all,
> > 
> > FYI, I just came across the following warnings when compiling 2.6.27 
> > (release) using gcc 4.3.2 (Debian 4.3.2-1) on Debian Lenny (i386):

...

> > drivers/usb/core/hcd.c: In function ___usb_hcd_poll_rh_status___:
> > include/asm/string_32.h:75: warning: array subscript is above array bounds

Does this refer to the call to memcpy() in usb_hcd_poll_rh_status()?

Line 75 in string_32.h is part of the __constant_memcpy() function.  
That function should not be involved here because the length argument 
isn't a compile-time constant.

This has to be either a compiler bug or else a bug in the
implementation of memcpy.

Alan Stern


<Prev in Thread] Current Thread [Next in Thread>