Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jfc From: jfc@athena.mit.edu (John F Carr) Newsgroups: comp.unix.aix Subject: Re: Invalid pointer traps (S/6000) Keywords: Traps, NIL, NULL, invalid pointers Message-ID: <1991Feb12.033513.27494@athena.mit.edu> Date: 12 Feb 91 03:35:13 GMT References: <24518@neptune.inf.ethz.ch> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 23 In article <24518@neptune.inf.ethz.ch> brandis@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@athena.mit.edu)