Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!mips!pacbell.com!pacbell!sactoh0!jak From: jak@sactoh0.UUCP (Jay A. Konigsberg) Newsgroups: comp.unix.wizards Subject: Re: Implementing NULL trapping (was: What machines core dump on deref of NULL?) Message-ID: <3456@sactoh0.UUCP> Date: 6 Jul 90 19:05:47 GMT References: <31079@cup.portal.com> <13226@smoke.BRL.MIL> <412@minya.UUCP> <13291@smoke.BRL.MIL> <1990Jul5.174608.17336@eci386.uucp> Reply-To: jak@sactoh0.UUCP (Jay A. Konigsberg) Organization: SAC-UNIX, Sacramento, Ca. Lines: 24 >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.