Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Why isn't argv[argc]==(char *)0 ? Keywords: X/OS, Olivetti, LSX, coredump Message-ID: <2673@auspex.auspex.com> Date: 27 Nov 89 23:32:18 GMT References: <547.nlhp3@oracle.nl> <1989Nov16.012439.6405@virtech.uucp> <2651@auspex.auspex.com> <1638@ctisbv.cti-software.nl> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 15 >>(I.e., unless you have to deal with an archaic UNIX or a Mutant UNIX >>From Hell, you can count on argv[argc] == 0.) > >In X/OS, a SYSV/BSD hybrid operating system for the Olivetti LSX >minicomputers, a reference to argv[argc] will make your program dump core. If you mean "a *de*reference *of* 'argv[argc]' will make your program dump core", that's true on Suns as well, and some other machines, since they don't let you dereference null pointers. If you mean "even trying to copy the (pointer) *value* somewhere else causes a core dump", then I think the label "Mutant UNIX From Hell" is well-deserved; I've nothing against, say, array bounds-checking, but "argv" has "argc+1" elements, not "argc" elements - if Olivetti intends to get POSIX or ANSI C support on the LSX, they'd better fix this....