Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!snorkelwacker!mit-eddie!aryeh From: aryeh@eddie.mit.edu (Aryeh M. Weiss) Newsgroups: comp.unix.wizards Subject: Re: What machines core dump on deref of NULL? Message-ID: <1990Jun30.134000.24937@eddie.mit.edu> Date: 30 Jun 90 13:40:00 GMT References: <444@mtndew.UUCP> <31079@cup.portal.com> <13226@smoke.BRL.MIL> <412@minya.UUCP> <1990Jun29.232656.20695@virtech.uucp> Reply-To: aryeh@eddie.MIT.EDU (Aryeh M. Weiss) Organization: MIT EE/CS Computer Facilities, Cambridge, MA Lines: 14 Under SCO Xenix V/386, 386 native 32-bit (`small' model) programs dump core on NULL deref. This is because location 0 is not allocated to the data space. Actually, stack grows down from 0x1880000, while static and heap storage grow up from this location (although this offset can be changed by a linker option). The situation is drastically different for 286 16-bit programs under Xenix 386 or Xenix 286. Small model 16-bit programs do not core dump because location 0 IS in the memory map. On the other hand, large and compact model 16-bit programs, where POINTERS are 32-bits (or 32-bit `far' pointers in medium/small programs) will cause a core dump because the most significant 16 bits of the pointer is actually a selector for the segment table and segment 0 cannot exist. --