Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/ufs/lfs



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



Home | Main Index | Thread Index | Old Index