Implementing NULL trapping (was: What machines core dump on deref of NULL?)
Jay A. Konigsberg
jak at sactoh0.UUCP
Sat Jul 7 05:05:47 AEST 1990
>As faulting on NULL dereference is often an explicit decision on the
>part of the O/S's memory management/loader definition people, I was
>wondering if anyone knew how to modify COFF to implement NULL trapping
>on COFF systems...
>
I have been watching this thread for some time now and to my surprise,
no one out there seems to know about the -z option.
ld(1): -z Do not bind anything to address zero. This option will allow
runtime detection of null pointers.
cc(1): the cc command recognizes ... -z ... and passes these options
directly to the loader [ld(1)].
Now, don't take this to mean I want this thread to stop, I don't. However
a lot of the postings seem to be asking how their machine can catch this
neferious error/bug. (one that I am all to guilty of - thats how I know
about the -z).
--
-------------------------------------------------------------
Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak
If something is worth doing, its worth doing correctly.
More information about the Comp.unix.wizards
mailing list