From owner-freebsd-current@FreeBSD.ORG Fri Jan 2 04:14:01 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4AFF9A for ; Fri, 2 Jan 2015 04:14:01 +0000 (UTC) Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55B2DD05 for ; Fri, 2 Jan 2015 04:14:00 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id k14so5895608wgh.16 for ; Thu, 01 Jan 2015 20:13:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=xx8wn7GL4WzB4LMAVAejvFEUXqtrFaMY1O3quT3fpfY=; b=F96oUiLGrSpFUqntmn/YI0B0HKH+/PQrRsSS3z97VWHotg8knMZCLelkGRLAFQ7JtV Cyjdq2NMyGXTWv2DctC0ahsXCmfZYFIs7Hdju4d0MdQODQrT88H0KfkckmoEuanJaVxV L3/dywzuAFJEJK8R4UQd9UBu5NiBWjC8P+Sa2WYuSrg3Y0mYrDa0h22qSdHhl50dxGFM ihU9fPfnESVmXsfJIODYNBzW6dHlyo/ezuhjNRdO/ip3ICWBwJE9CSUWQOCn4vQ2H88w KjXaaIL5Nzl49BTbNJKoHlb+2sO0o9FBQTINSvDkLMpxlauVUnNHZUNJr5lzjaZ0eIzo wLtg== X-Gm-Message-State: ALoCoQkpyrhc1RFksHqexLZlQbrWVEB8S/2yf11V1yLNyPhHiT6Kk+VEyl7WbFQJuWRdlavrkWj5 X-Received: by 10.180.78.202 with SMTP id d10mr131482250wix.82.1420172038988; Thu, 01 Jan 2015 20:13:58 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id j1sm63274707wjw.25.2015.01.01.20.13.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jan 2015 20:13:58 -0800 (PST) Message-ID: <54A61AFD.3040507@multiplay.co.uk> Date: Fri, 02 Jan 2015 04:13:49 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: asr(4) error with new clang/llvm References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 02 Jan 2015 04:14:01 -0000 On 02/01/2015 01:23, Bjoern A. Zeeb wrote: > Hi, > > you need the next line of source to see that while the union only defines Simple[1], the comparison goes up to SG_LIST (or something) which is indeed defined as 58. Cn someone fix this? This makes i386 compiles failing currently. > > /scratch/tmp/bz/head.svn/sys/modules/asr/../../dev/asr/asr.c:1849:29: error: array index 58 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds] > while ((len > 0) && (sg < &((PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE) > ^ > /scratch/tmp/bz/head.svn/sys/dev/asr/i2omsg.h:934:8: note: array 'Simple' declared here > I2O_SGE_SIMPLE_ELEMENT Simple[1]; > ^ If that's wrong it looks like there's also a number of calls to the macro SG(SGL,Index,Flags,Buffer,Size) which are also wrong as Index is used in the same way: &(((PI2O_SG_ELEMENT)(SGL))->u.Simple[Index] There appears to be two calls to SG where Index is 1. I'm afraid I have no idea what the fix would be as the entire driver is very voodoo like to me :( Regards Steve