Subject: Re: CVS commit: src/sys/ufs/lfs
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Tyler Retzlaff <rtr@omicron-persei-8.net>
List: source-changes
Date: 03/19/2006 23:30:53
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? As
opposed to dereference of garbage ptr which may or may not fail
immediately? and in such a case potentially corrupt some other (possibly
unrelated) memory which would lead to a fault/crash later that were
harder to trace back to the original bad dereference?
Maybe this is userland thinking and things are different in the kernel.
>as it's impossible to predict what kind of bugs we'll have here,
>i don't think you can say the change will help or hurt.
>
>
Agreed, but I think if things were assigned to known values before
conditional expressions involving them it can avoid accidents.
Tyler