Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!ucsd!ucsdhub!esosun!seismo!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.arch Subject: Re: NULL pointers (was: Software Distribution) Keywords: software distribution, null pointers Message-ID: <1690@ficc.uu.net> Date: 3 Oct 88 14:56:48 GMT References: <978@esunix.UUCP> <3112@pt.cs.cmu.edu> <1988Sep29.141726.14882@ateng.ateng.com> Organization: SCADA Lines: 15 In article <1988Sep29.141726.14882@ateng.ateng.com>, chip@ateng.ateng.com (Chip Salzenberg) writes: > According to bsy@PLAY.MACH.CS.CMU.EDU (Bennet Yee): > >Of course, if your machine core dumps on dereferencing NULL, just trap the > >fault (SIGSEGV), check the instruction that caused the trap, and patch up > >and return if it was due to dereferencing NULL; otherwise dump core. No no, no. If the program traps on dereferencing NULL you pack it up and send it back to the vendor. This is a *bug*. Even if it's safe on some machines it's still a bug. And for the other case, I can't imagine anyone actually writing code that depended on *NULL being illegal... -- Peter da Silva `-_-' Ferranti International Controls Corporation. "Have you hugged U your wolf today?" peter@ficc.uu.net