From owner-freebsd-current@FreeBSD.ORG Mon Nov 28 00:59:40 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAD9C106567C; Mon, 28 Nov 2011 00:59:40 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 422BF8FC1C; Mon, 28 Nov 2011 00:59:39 +0000 (UTC) Received: by wwe5 with SMTP id 5so7657943wwe.31 for ; Sun, 27 Nov 2011 16:59:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=dYCaeygb8GQUNIYCMTLYzZPCJZy72vAjmKGjn6jlkzE=; b=EwNmSnpjWq8NXqoF7I6VtAkFzuZHk1wLdDrnQkeSaxGKFAmOWI7py4g2Z6k2qsMUPa 7oWF3xYakX4WA4y+jkJjfI5Um7uM4VDnYmJmhij3xwelC5QlkAgzGpUttczVuHYaxnza EPqCzIpAqEJshwFeeR+0wAfGlPjsNR72yGpgM= MIME-Version: 1.0 Received: by 10.180.90.6 with SMTP id bs6mr41901893wib.63.1322441979133; Sun, 27 Nov 2011 16:59:39 -0800 (PST) Received: by 10.180.101.102 with HTTP; Sun, 27 Nov 2011 16:59:39 -0800 (PST) In-Reply-To: <4ED2CAFF.7070608@FreeBSD.org> References: <4ED2CAFF.7070608@FreeBSD.org> Date: Sun, 27 Nov 2011 19:59:39 -0500 Message-ID: From: Ryan Stone To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD current Subject: Re: array index of '-16' indexes before the beginning of the array X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 00:59:40 -0000 On Sun, Nov 27, 2011 at 6:42 PM, Andriy Gapon 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.