Path: utzoo!utgpu!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.windows.x Subject: Re: X 10 for the Sun 4: Does it exist? (clarification) Message-ID: <396@auspex.UUCP> Date: 3 Nov 88 18:07:19 GMT References: <21943@cornell.UUCP> <21944@cornell.UUCP> <22278@cornell.UUCP> Reply-To: guy@auspex.UUCP (Guy Harris) Distribution: comp Organization: Auspex Systems, Santa Clara Lines: 18 >Finally, one person suggested that there is a problem compiling the X >server under SUN OS 4.0 --- Something about the code assuming that >locals are initialized to 0, and the compiler not so initializing them. I know of no compilers that so initialize them. It just so happens that on UNIX implementations, when stack pages are created they are filled with zeroes, which means that the *first* time you use a stack page, the locals are likely to be zero. Unfortunately, in SunOS 4.0, "main()" and its descendents are usually *not* the first guys to use the first stack page or so; the run-time loader gets there first, and the result is that they aren't filled with zeroes when "main()" and procedures it calls use them. Neither the C language nor UNIX guarantee that locals will be initialized to any particular value - and, if some routine is called more than once, there is a good chance that they will *not* be initialized to zero on calls after the first.