home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.c
- Subject: Re: Pointers to freed memory
- Date: 31 Jul 1992 15:43:34 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 27
- Message-ID: <15bn36INNfvj@early-bird.think.com>
- References: <3179@dozo.and.nl> <1992Jul30.164035.7349@taumet.com> <3185@dozo.and.nl>
- NNTP-Posting-Host: telecaster.think.com
-
- In article <3185@dozo.and.nl> jos@and.nl (Jos Horsmeier) writes:
- >I never could have
- >imagined a processor architecture where a validation on an address
- >value would be done while just _loading_ that particular value. But
- >such (ugly) animals seem to exist; I've never had the `pleasure'
- >to meet one ...
-
- I remember this coming up when we were considering porting Multics to a
- (then) new Honeywell process (I think it was the DPS/88). Multics uses
- several invalid segments for various purposes; for instance, anything in
- segment -1 is a null pointer. Previous generations of hardware would trap
- when dereferencing through such pointers, which is just what we wanted.
- The new hardware trapped when loading addresses into pointer registers,
- thus making our normal mechanism for loading null pointers invalid. The
- hardware designers probably thought they were doing a Good Thing by
- checking pointers earlier on (I suppose it helps you find out where the
- invalid pointer came from), but they never realized that some of us were
- using invalid pointers for special purposes (I think we also expected to
- run into some problems porting Lisp to this machine, since it stored its
- tag fields in unused bits in pointer representations, and the new machine
- may have checked that those were always 0).
-
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-