What machines core dump on deref of NULL?

Aryeh M. Weiss aryeh at eddie.mit.edu
Sat Jun 30 23:40:00 AEST 1990


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.

-- 



More information about the Comp.unix.wizards mailing list