Re: array index of '-16' indexes before the beginning of the array

From: Ryan Stone <rysto32_at_gmail.com>
Date: Sun, 27 Nov 2011 19:59:39 -0500
On Sun, Nov 27, 2011 at 6:42 PM, Andriy Gapon <avg_at_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' indexes
> before the beginning of the array [-Warray-bounds]
>        lapics[apic_id].la_ioint_irqs[IDT_DTRACE_RET - APIC_IO_INTS] =
> 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.
Received on Sun Nov 27 2011 - 23:59:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:21 UTC