> On Feb 20, 2015, at 12:01 PM, Jeff Law <l...@redhat.com> wrote:
> 
> ...
> Regardless, the right thing to do is to disable elimination of NULL pointer 
> checks on targets where page 0 is mapped and thus a reference to *0 may not 
> fault.  In my mind this is an attribute of both the processor (see H8 above) 
> and/or the target OS.
> 
> On those targets the C-runtime had better also ensure that its headers aren't 
> decorated with non-null attributes, particularly for the mem* and str* 
> functions.

pdp11 is an example of such a target, independent of OS (with only 8 pages, 
clearly no one is going to unmap page 0).  Fortunately there one is unlikely to 
find C program data structures at 0 (instead, vectors if kernel, stack limit if 
user mode).  So no fault is correct there, but no null (0 bits) pointer is also 
— for practical purposes — a valid assumption.

Reply via email to