Subject: Re: CVS commit: src/sys/ufs/lfs
To: Ben Harris <bjh21@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: source-changes
Date: 03/19/2006 14:29:26
On Sun, Mar 19, 2006 at 12:58:35PM +0000, Ben Harris wrote:
> In article <441D4EFD.1010507@omicron-persei-8.net> you write:
> >YAMAMOTO Takashi wrote:
> >>what i don't understand here is, why you think NULL initialization is
> >>better wrt future bugs.
> >>  
> >>
> >Would a dereference of the NULL ptr not cause immediate failure?
> 
> Not necessarily.  On older ARM systems, the kernel has a page mapped at 
> address zero containing the CPU vectors.  Reading through null pointers 
> works fine, and writing corrupts the vector table, which you'll only 
> find out about when you next take a page fault, interrupt or whatever.

Then maybe NULL should be defined to something else than 0 on those
platforms ? I wonder how much things will break if we have NULL != 0
though ...

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--