Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: cudcv%warwick.ac.uk@nss.cs.ucl.ac.uk (Rob McMahon) Newsgroups: comp.sys.sun Subject: Re: Caps (from caps.shar) and SunOS4.0 Message-ID: <99@titania.warwick.ac.uk> Date: 10 Feb 89 04:30:30 GMT References: <8901091432.AA02687@rice.edu> <94@titania.warwick.ac.uk> Sender: usenet@rice.edu Organization: Computing Services, Warwick University, UK Lines: 20 Approved: Sun-Spots@rice.edu Original-Date: 4 Feb 89 12:43:58 GMT X-Sun-Spots-Digest: Volume 7, Issue 148, message 3 of 6 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@uk.ac.warwick ARPA: cudcv@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 ]]