Caps (from caps.shar) and SunOS4.0

Rob McMahon cudcv%warwick.ac.uk at nss.cs.ucl.ac.uk
Fri Feb 10 14:30:30 AEST 1989


I wrote:
>Caps fails to initialiase a structure properly, I don't know why it worked
>on 3.2, must have been a quirk of the compiler.

Guy Harris wrote to me to explain it, and it sounds like something to
watch out for.  Since 4.0, main is no longer the first to get at the
stack, the loader is, so variables that got initialised to zero for free
under previous versions of Unix may now contain random garbage left by the
loader.

Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv at uk.ac.warwick             ARPA:   cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England

[[ K&R, page 198:  "Static and external variables which are not
initialized are guaranteed to start off as 0; automatic and register
variables which are not initialized are guaranteed to start off as
garbage."  --wnl ]]



More information about the Comp.sys.sun mailing list