Referencing through a null pointer
Bill.Stewart.<ho95c>
wcs at skep2.ATT.COM
Fri Apr 29 13:20:23 AEST 1988
In article <9946 at tekecs.TEK.COM> andrew at frip.gwd.tek.com (Andrew Klossner) writes:
> If I'm a computer center manager searching for a replacement
> for my aging 11/780's, and my several-megabyte Bread-and-Butter
> Application works on system X but not on system Y, how much
> credence do you think the Y salesperson will get from me when she
> explains that my program has no business dereferencing 0?
Sigh. It's evil, and managers just don't *understand* :-).
We have a manager here who still doesn't trust HPs becuase the
floating point formats are different, and doesn't trust 3Bs because
they're big-endian.
You can't just fix it by putting a zero into location zero, either,
since people can dereference structure pointers without setting
them first. (i.e. struct foo { int a,b,c; } foo; x=foo->c; )
You might tell them that VAX programs that suffer from this problem
will sometimes produce WRONG OUTPUT SILENTLY on VAXen.
--
# Thanks;
# Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs
# skep2 is a local machine I'm trying to turn into a server. Please send
# mail to ho95c or ho95e instead. Thanks.
More information about the Comp.unix.wizards
mailing list