Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755985AbYKDQCW (ORCPT ); Tue, 4 Nov 2008 11:02:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755239AbYKDQCF (ORCPT ); Tue, 4 Nov 2008 11:02:05 -0500 Received: from mx33.mail.ru ([194.67.23.194]:3337 "EHLO mx33.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755506AbYKDQCE (ORCPT ); Tue, 4 Nov 2008 11:02:04 -0500 From: Andrey Borzenkov To: Alan Stern Subject: Re: 2.6.28-rc3: usb_hcd_poll_rh_status: array subscript is above array bounds Date: Tue, 4 Nov 2008 19:01:54 +0300 User-Agent: KMail/1.9.10 Cc: USB list , Linux Kernel Mailing List References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1323241.D7nTJNSOnU"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200811041901.55808.arvidjaar@mail.ru> X-Spam: Not detected X-Mras: OK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1826 Lines: 52 --nextPart1323241.D7nTJNSOnU Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 03 November 2008, Alan Stern wrote: > On Mon, 3 Nov 2008, Andrey Borzenkov wrote: >=20 > > CC [M] drivers/usb/core/hcd.o > > /home/bor/src/linux-git/drivers/usb/core/hcd.c: In function =E2=80=98us= b_hcd_poll_rh_status=E2=80=99: > > /home/bor/src/linux-git/arch/x86/include/asm/string_32.h:75: warning: a= rray subscript is above array bounds > >=20 > > It is likely that issue is actually in string_32.h as similar errors are > > in oher places as well. >=20 > I think this is actually a compiler bug. It certainly has nothing to > do with USB. There was a discussion about it a month or so ago on > LKML. >=20 Yes this really looks like a compiler bug, "length" hardly can be considered constant expression even using very broad definition of "constant". What is interesting though, it appears that compiler believes length has value of 5. So it will copy one extra byte; and possibly pass incorrect length to the caller. I cannot judge whether this garbage can do any harm. Dp you know if it was ever reported to gcc folks? --nextPart1323241.D7nTJNSOnU Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkkQcfMACgkQR6LMutpd94wzvgCfRXhkRPBJJaBJAke+TZtAJrzB m9MAn037YqX++0X/62OCy/5iCdEI54Y9 =r31F -----END PGP SIGNATURE----- --nextPart1323241.D7nTJNSOnU-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/