NULL pointers

Guy Harris guy at rlgvax.UUCP
Sun Feb 10 05:30:54 AEST 1985


> The recent discussion on NULL pointers having the value 0 brings to
> mind a problem encountered in the days of Version 6: data was loaded
> at location 0 sometimes (on a PDP-11/40).

11/40 or 11/45?  The 11/40 didn't have separate I&D space, so the C
startup code should have appeared at location 0, unless you were using
something other than C.  I don't think the problem existed for split I&D
programs, either; the C startup (at least in V7 and subsequent versions, and
I think it worked this way in V6 as well) for split I&D-space programs had
a little one-word shim in the data space which got loaded at location 0,
so that data got loaded at location 2, in effect.  An early release of an
unspecified manufacturer's UNIX system had the same problem, which surprised
the heck out of some of our software when it got a NULL pointer it wasn't
expecting.  They fixed it shortly afterwards.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.lang.c mailing list