From owner-freebsd-current@FreeBSD.ORG Fri Jul 20 21:07:12 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79116106566B; Fri, 20 Jul 2012 21:07:12 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 440D18FC08; Fri, 20 Jul 2012 21:07:12 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q6KL79Qg009685 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 20 Jul 2012 21:07:11 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120720163352.GS2676@deviant.kiev.zoral.com.ua> Date: Fri, 20 Jul 2012 22:07:05 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <9EBB4101-3117-4FE0-AD08-1053423BECD6@FreeBSD.org> References: <50097BF0.9010103@FreeBSD.org> <20120720163352.GS2676@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1278) Cc: Kim Culhan , freebsd-current@FreeBSD.org, Dimitry Andric Subject: Re: -current build failure 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: Fri, 20 Jul 2012 21:07:12 -0000 On 20 Jul 2012, at 17:33, Konstantin Belousov wrote: > It is not related to dtrace at all, and indeed OFFSETOF_CURTHREAD is = 0. > This is a bug in clang, we compile our kernel in freestanding = environment. The copies of the C spec that I have do not differentiate between = freestanding and hosted environments for the validity of dereferencing a = pointer value of 0. Doing so is undefined in all cases and any = standards-compliant compiler is quite at liberty to eat your dog in such = situations - it is explicitly not guaranteed to read the memory at = linear address 0 (this is undefined for at least two reasons that I can = think of from the C spec, and probably more). =20 David=