From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8oZJ-0003l1-P0 for qemu-devel@nongnu.org; Mon, 21 Nov 2016 08:23:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8oZG-0007Kv-Ig for qemu-devel@nongnu.org; Mon, 21 Nov 2016 08:23:33 -0500 References: <20161121121617.5146.1948.malonedeb@wampee.canonical.com> From: Thomas Huth Message-ID: <515d6ef7-df9f-8bae-f7bf-615c28c60aa2@redhat.com> Date: Mon, 21 Nov 2016 14:23:25 +0100 MIME-Version: 1.0 In-Reply-To: <20161121121617.5146.1948.malonedeb@wampee.canonical.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Bug 1643537 <1643537@bugs.launchpad.net>, qemu-devel@nongnu.org, Jose Ricardo Ziviani Cc: "qemu-ppc@nongnu.org" 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