Date: Sun, 27 Nov 2011 19:59:39 -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: <CAFMmRNzXU%2BVyqYmob%2BCy=JW71dTQPKZ9BOzLcnEjdYxBr6xkmw@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; Hm, so as far as I can tell the DTrace-related code in local_apic.c is bogus. DTrace's interrupt vectors are 32 and 33, which aren't I/O vectors, so local_apic.c shouldn't need to know anything about them. I think that the right fix is to remove all of it from local_apic.c.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNzXU%2BVyqYmob%2BCy=JW71dTQPKZ9BOzLcnEjdYxBr6xkmw>