Path: utzoo!mnetor!uunet!husc6!rutgers!mtunx!whuts!homxb!genesis!hotlr!dkc From: dkc@hotlr.ATT (Dave Cornutt) Newsgroups: comp.unix.wizards Subject: Re: Referencing through a null pointer Message-ID: <342@hotlr.ATT> Date: 26 Apr 88 14:33:57 GMT References: <4729@cup.portal.com> <1988Apr24.092740.8673@utzoo.uucp> <50676@sun.uucp> <2730@bsu-cs.UUCP> Reply-To: dkc@hotlr.UUCP (Dave Cornutt) Organization: Not much, but I'm working on it Lines: 34 Keywords: Gould prot Vax braindamage Summary: Gould /etc/prot tells what to do In article <2730@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: > A suggestion to system designers, to decrease the frustration of > customers who want to run software developed on systems that return 0 > from a dereferenced null pointer. > > So long as your memory management hardware is trapping references > through a null pointer and printing an error message, how about > allowing the user to set a switch that will cause such illegal trapped > references to be handled by an emulation routine that will cause a zero > to be returned and continue execution? Gould already does this. They have a utility called "prot" in /etc that can set this to one of three modes: ignore, warn, or fatal. In ignore mode, reads of location 0 are emulated and return 0, and writes silently go in the bit bucket. Warning mode is the same except that the a message is printed on the terminal (if there's a controlling tty associated with the offending process), and in the system error log. In fatal mode, the offending process gets socked with SIGSEGV. They strongly recommend that you put it in fatal mode in /etc/rc and leave it that way unless ignore or warning mode is needed for some particular reason. (Note: these are not the actual mode names; I can't remember them.) And, in article , ron@topaz.rutgers.edu (Ron Natalie) writes: > I believe Gould calls this feature on their system: "Braindamaged VAX > compatibility mode." Well, not *officially*... :-) -- Dave Cornutt, AT&T Bell Labs (rm 4A406,x1088), Holmdel, NJ UUCP:{ihnp4,allegra,cbosgd}!hotly!dkc "The opinions expressed herein are not necessarily my employer's, not necessarily mine, and probably not necessary"