Referencing through a null pointer
Dave Cornutt
dkc at hotlr.ATT
Wed Apr 27 00:33:57 AEST 1988
In article <2730 at bsu-cs.UUCP> dhesi at 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 <Apr.25.20.40.05.1988.10155 at topaz.rutgers.edu>,
ron at 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"
More information about the Comp.unix.wizards
mailing list