Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Referencing through a null pointer
Message-ID: <1988Apr25.230435.3434@utzoo.uucp>
Organization: U of Toronto Zoology
References: <4729@cup.portal.com>, <11199@mimsy.UUCP>
Date: Mon, 25 Apr 88 23:04:35 GMT

> I imagine that PDP-11s without split I&D had *(char *)0 == 7 or 8, and
> *(short *)0 == 0407 or 0408 (OMAGIC and NMAGIC respectively).

Actually, no.  The a.out header was not part of the actual core image, so
the first instruction of the program was first; in practice this was the
"setd" that got the floating-point processor into the right mode (or tipped
the software off that the processor lacked hardware floating point), which
gave *(char *)0 == 011 and *(short *)0 == 0170011.  The programs which
made assumptions about *0 were generally the big ones, which ran split-space
of necessity.
-- 
"Noalias must go.  This is           |  Henry Spencer @ U of Toronto Zoology
non-negotiable."  --DMR              | {ihnp4,decvax,uunet!mnetor}!utzoo!henry
