Xref: utzoo comp.lang.c:14327 comp.sys.m68k:1028 Newsgroups: comp.lang.c,comp.sys.m68k Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Messing with 0 ptr on m68020 & sys V / 68 Message-ID: <1988Nov28.204619.2145@utzoo.uucp> Organization: U of Toronto Zoology References: <784@clinet.FI> Date: Mon, 28 Nov 88 20:46:19 GMT In article <784@clinet.FI> riku@clinet.fi (Riku Kalinen) writes: >Seems that my process's address space contains 1 k read-only nulls in >very beginnig. > > 1) Why? This causes reference thru 0 ptr to return 0 instead of core dump. Somebody is making a concession to badly-written programs. Sun had to bite the bullet and fix this because the Sun 1 just couldn't do "*0", and their fixes got propagated back into 4.nBSD. System V, especially its early releases, was a very different story, and provided considerable incentive for having a readable location 0. > 2) Who sets up process's memory when it is started? Kernel? Right. Actually it's a three-way collaboration between the kernel, the details specified by ld, and the file format (which limits what ld can say). -- SunOSish, adj: requiring | Henry Spencer at U of Toronto Zoology 32-bit bug numbers. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu