Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!sgi!shinobu!odin!soul.esd.sgi.com!jeffs From: jeffs@soul.esd.sgi.com (Jeff Smith) Newsgroups: comp.unix.aix Subject: Re: Invalid pointer traps (S/6000) Keywords: Traps, NIL, NULL, invalid pointers Message-ID: <1991Feb13.223557.3901@odin.corp.sgi.com> Date: 13 Feb 91 22:35:57 GMT References: <24518@neptune.inf.ethz.ch> <1991Feb12.033513.27494@athena.mit.edu> Sender: news@odin.corp.sgi.com (Net News) Reply-To: jeffs@sgi.com Organization: Silicon Graphics, Mt View, Ca Lines: 21 In article <1991Feb12.033513.27494@athena.mit.edu>, jfc@athena.mit.edu (John F Carr) writes: |> 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. Lots of things do break when *(char *)0 != 0. On early AIX/ps 1, *(char *)0 was really 'L'. The coff header was mapped in at address 0, and the first byte of the magic number corresponded 'L' I belive. This broke lots of utilities from the RT tree (parts of PS/2 and RS/6000 AIX started here). I wasn't around when they made *(char *)0 trap, but, I know it wasn't a easy time. Surprised they changed it back in 1.2 though. I used 1.2 for 8 months or so, but never noticed it. And no, the AIX 1 developers (PS/2) and the AIX 3 (RS/6000) developers don't talk much. jeffs@sgi.com