Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2012 22:07:05 +0100
From:      David Chisnall <theraven@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Kim Culhan <w8hdkim@gmail.com>, freebsd-current@FreeBSD.org, Dimitry Andric <dim@FreeBSD.org>
Subject:   Re: -current build failure
Message-ID:  <9EBB4101-3117-4FE0-AD08-1053423BECD6@FreeBSD.org>
In-Reply-To: <20120720163352.GS2676@deviant.kiev.zoral.com.ua>
References:  <CAKZxVQV5xhFDN_WbTk-EMoQ18N8u1f4YhqKSJQFUzbX4NZxhUA@mail.gmail.com> <50097BF0.9010103@FreeBSD.org> <20120720163352.GS2676@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9EBB4101-3117-4FE0-AD08-1053423BECD6>