Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!dual!lll-crg!seismo!hao!nbires!opus!rcd
From: rcd@opus.UUCP (Dick Dunn)
Newsgroups: net.arch
Subject: Re: uninitialized data (on 6000/Cyber)
Message-ID: <92@opus.UUCP>
Date: Tue, 1-Oct-85 03:38:35 EDT
Article-I.D.: opus.92
Posted: Tue Oct  1 03:38:35 1985
Date-Received: Sun, 6-Oct-85 04:45:53 EDT
References: <436@uvm-cs.UUCP> <164@tulane.UUCP>
Organization: NBI,Inc, Boulder CO
Lines: 30

> >   Laex Colvin asks about an architecture that traps on using uniniitialized
> > data.  The CDC 6000 series architecture does sort of.  An option to the loader
> > will cause all data locations to be filled with a bit pattern representing
> > "indefinite" which the CPU will choke on.
> ...
> This is an extremely high overhead way of checking for uninitialized data.

Actually, it's almost no overhead.  A loader can initialize a data area
very quickly (faster than transferring data from disk).  The "indefinite"
bit pattern really only works for floating-point data (although a
modification for pointers is fairly easy), and it comes for free.  The
indefinite value is roughly the equivalent of a NaN (not a number)
representation, which the floating point unit has to handle anyway.  (Strange
as it may seem, this machine traps ONLY on invalid operands, not on invalid
results.)

Since words are much wider than addresses, the uninitialized-data bit
pattern can contain not only the "indefinite" indicator (which affects only
the exponent of the number), but the address of the uninitialized location.
Thus, although a value might be picked up and moved around before being
used as an operand, when used it will show the location where it was
originally stored.  Obviously the "bad parity" trick catches the reference
to uninitialized data right away, but it has some other problems mentioned
in other current articles.

(And there is yet another tweak which will cause an error on an attempt to
execute the uninitialized word.)
-- 
Dick Dunn	{hao,ucbvax,allegra}!nbires!rcd		(303)444-5710 x3086
   ...If you plant ice, you're gonna harvest wind.