Referencing through a null pointer
Rahul Dhesi
dhesi at bsu-cs.UUCP
Tue Apr 26 05:23:35 AEST 1988
[0 stored at location 0, allowing access through null pointer]
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?
Conceptually this is not much different from emulation of illegal
(nonexistent) floating point instructions, or handling of page faults.
--
Rahul Dhesi UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi
More information about the Comp.unix.wizards
mailing list