dumping core on *(NULL) is not a function of your processor

Guy Harris guy at gorodish.Sun.COM
Thu Aug 4 13:07:47 AEST 1988


> A new magic number is nice 'cause then you could simply convert your existing
> executables.  This would save having to recompile stuff, and would let you
> check the products of vendors who only provide binary distributions.

No, you can't.  The problem is not that implementations of UNIX (or other OSes,
for that matter) on some machines construct an address space with a page full
of uninteresting stuff starting at location 0; the problem is that they put the
first instruction to be executed when running an image at location 0, and put
other objects (code or data) into that page.  If you just patch the magic
number, the program will still start at location 0; however, since there
wouldn't be a location 0, it would bomb out.

Since executables tend to lack relocation bits, you can't just shuffle the
address space of the program up by one page, either; absolute references to
objects in the first page will bomb out.

> Could a system call be added (horrors!) or an existing call modified to
> map out page 0 (or for that matter, any arbitrary page you chose)?

Either of those could be done, but they have the same problem; if the program
wasn't built to run in an address space lacking the first page, it'll die
whenever it references something that legitimately exists within that page.



More information about the Comp.unix.wizards mailing list