Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2011 18:51:03 -0500
From:      Ryan Stone <rysto32@gmail.com>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: array index of '-16' indexes before the beginning of the array
Message-ID:  <CAFMmRNyN_bve%2B0yY44=i_6UdKrxvN0%2BF9yVq7Fp45rqmX1EbwQ@mail.gmail.com>
In-Reply-To: <4ED2CAFF.7070608@FreeBSD.org>
References:  <4ED2CAFF.7070608@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 27, 2011 at 6:42 PM, Andriy Gapon <avg@freebsd.org> wrote:
>
> Looks like clang has found a real issue here:
> /usr/src/sys/x86/x86/local_apic.c:311:2: warning: array index of '-16' in=
dexes
> before the beginning of the array [-Warray-bounds]
> =A0 =A0 =A0 =A0lapics[apic_id].la_ioint_irqs[IDT_DTRACE_RET - APIC_IO_INT=
S] =3D
> IRQ_DTRACE_RET;
>
> IDT_DTRACE_RET (0x20) indeed seems to be less than APIC_IO_INTS.

Uh-oh, I appear to have broken this in r227290.  I'll try to figure
out what's actually supposed to be done here.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNyN_bve%2B0yY44=i_6UdKrxvN0%2BF9yVq7Fp45rqmX1EbwQ>