home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / c / 11817 < prev    next >
Encoding:
Internet Message Format  |  1992-07-31  |  1.8 KB

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