awk bug

Brandon Allbery allbery at ncoast.UUCP
Wed Feb 17 10:33:46 AEST 1988


As quoted from <275 at ho7cad.ATT.COM> by ekb at ho7cad.ATT.COM (Eric K. Bustad):
+---------------
| In article <3763 at megaron.arizona.edu>, rupley at arizona.edu (John Rupley) writes:
| Any code that does this will happen to work on a VAX running UNIX, but
| will fail on many more machines than just AT&T's 3B20.  I seem to recall
| that on some machines you will get a memory access error if you dereference
| a NULL pointer!  I rather will that the 3B20 did this, so that these
| errors would have been caught much earlier.
+---------------

The COFF loader supports the -Z option to force address zero to not be mapped.
Alternatively, I believe SVR3 ld uses "ifiles" to construct load images; in
this case, you can edit the ifiles to not map address zero:

MEMORY {
	user_mem : origin = 0x2, length = 0xffffffff
}

which insures that the first word of memory is never mapped.  If your ld
doesn't allow either of these but DOES use ifiles, create an ifile with
the above declaration and make it the first argument to ld.  (The length might
have to be tuned for a particular system, e.g. 3B1s can't map past address
0x300000 due to the shared memory hack.)
-- 
	      Brandon S. Allbery, moderator of comp.sources.misc
       {well!hoptoad,uunet!hnsurg3,cbosgd,sun!mandrill}!ncoast!allbery
KABOOM!!! Worf: "I think I'm sick." LaForge: "I'm sure half the ship knows it."



More information about the Comp.bugs.sys5 mailing list