Referencing through a null pointer

Jim Shankland jas at llama.rtech.UUCP
Thu Apr 28 03:48:16 AEST 1988


In article <9946 at tekecs.TEK.COM> andrew at frip.gwd.tek.com (Andrew Klossner) writes:
>We can sit here and smirk about how ideologically impure these fools
>are who want a 0 at location 0, but the real world is full of hoary old
>programs that run fine on a VAX and fail on the class of systems that
>don't have a 0 at 0.  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?

Personally, all my code assumes there's a 17 at location 0.  It comes
in really handy sometimes, and it works great on my machine, a
Waxahatchy 9400/X; if my program breaks on other machines that stupidly
put some other value at 0, or that read-protect address 0, then those
other machines are just broken.

Aren't they?

Jim Shankland
  ..!ihnp4!cpsc6a!\
               sun!rtech!jas
 ..!ucbvax!mtxinu!/

	And I will show you something different from either
	Your shadow at morning striding behind you
	Or your shadow at evening rising to meet you;
	I will show you fear in a handful of dust.

			-- T. S. Eliot



More information about the Comp.unix.wizards mailing list