Invalid pointer traps (S/6000)
John F Carr
jfc at athena.mit.edu
Tue Feb 12 14:35:13 AEST 1991
In article <24518 at neptune.inf.ethz.ch> brandis at inf.ethz.ch (Marc Brandis) writes:
>As I understand the hardware documentation, the MMU does in fact detect the
>illegal access, so the whole thing can only be a matter of the operating system.
The problem is, page zero is mapped and readable. The MMU detects no
exception.
>Is there a way to turn this off so that all accesses to unmapped pages report
>an exception, not only writes?
There doesn't appear to be a way in the current OS version to unmap page
zero. Even using the linker -T and -D flags to move the program text and
data out of page zero doesn't help (it doesn't put anything in page zero,
but it leaves it accessible).
Speculation: IBM found too many things broke when they made NULL pointer
dereferences trap. The documentation even says that *(int *)0 == 0. AIX
1.1 made NULL pointer reads trap, and IBM changed this for AIX 1.2 to allow
reads from location 0. I don't know if the AIX 1 developers talk to the AIX
3 developers or not.
--
John Carr (jfc at athena.mit.edu)
More information about the Comp.unix.aix
mailing list