Messing with 0 ptr on m68020 & sys V / 68

Guy Harris guy at auspex.UUCP
Wed Nov 30 03:53:11 AEST 1988


>This "bug" has to be present for many of the utilities to run.

No, it doesn't.  You can fix the utilities; that's what was done at Sun
for all the cases noted.

There is (as has been stated zillions of times) no requirement in any C
specification that you be able to dereference a null pointer.  Some
systems disallow it (VMS is one that comes to mind).

>In e.g. the SCCS, lots of programs has a chain of pointers, which end by just
>referencing (xxx *)0 for reading.  That's just the way it is coded.

Well, it's not coded that way in the Sun version, because....

>Your OS vendor the has to allow you to read from address 0,

Sun doesn't allow it, and neither do some other vendors.

Motorola may have given up in disgust and mapped a bunch of zeroes there.



More information about the Comp.lang.c mailing list