From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8q34-00077Y-FR for qemu-devel@nongnu.org; Mon, 21 Nov 2016 09:58:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8q30-0000TS-Kj for qemu-devel@nongnu.org; Mon, 21 Nov 2016 09:58:22 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48897) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c8q30-0000T2-Aj for qemu-devel@nongnu.org; Mon, 21 Nov 2016 09:58:18 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uALEsgQ8015375 for ; Mon, 21 Nov 2016 09:58:17 -0500 Received: from e24smtp04.br.ibm.com (e24smtp04.br.ibm.com [32.104.18.25]) by mx0a-001b2d01.pphosted.com with ESMTP id 26v02kd8pq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 21 Nov 2016 09:58:16 -0500 Received: from localhost by e24smtp04.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Nov 2016 12:58:12 -0200 Date: Mon, 21 Nov 2016 12:58:05 -0200 From: joserz@linux.vnet.ibm.com References: <20161121121617.5146.1948.malonedeb@wampee.canonical.com> <515d6ef7-df9f-8bae-f7bf-615c28c60aa2@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <515d6ef7-df9f-8bae-f7bf-615c28c60aa2@redhat.com> Message-Id: <20161121145804.GA15058@pacoca> Subject: Re: [Qemu-devel] [Bug 1643537] [NEW] target-ppc/int_helper.c: 2 * bad array index List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: Bug 1643537 <1643537@bugs.launchpad.net>, qemu-devel@nongnu.org, "qemu-ppc@nongnu.org" On Mon, Nov 21, 2016 at 02:23:25PM +0100, Thomas Huth wrote: > On 21.11.2016 13:16, dcb wrote: > > Public bug reported: > > > > 1. > > > > [qemu/target-ppc/int_helper.c:2575]: (error) Array 'reg.u16[8]' accessed > > at index 8, which is out of bounds. > > > > Source code is > > > > return reg->u16[8 - n]; > > > > and > > > > qemu/target-ppc/cpu.h: uint16_t u16[8]; > > > > but at least once, n is zero, for example line 2725 in the int_helper.c > > file: > > > > uint16_t sgnb = get_national_digit(b, 0); > > That looks wrong, indeed. I guess it should be "7 - n" instead of > "8 - n"? Jose, could you please have a look at this? > > Thomas > Hello Thomas, Just sent a patch to address it. Thanks for letting me know it. Ziviani