home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / aix / 8868 < prev    next >
Encoding:
Text File  |  1992-08-17  |  2.0 KB  |  45 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!panews!muddy.awdpa.ibm.com!steve
  3. From: steve@ibmpa.awdpa.ibm.com (Steve DeJarnett)
  4. Subject: Re: AIX 3.2 - Can't use NULL pointers?
  5. Message-ID: <1992Aug17.194916.24385@ibmpa.awdpa.ibm.com>
  6. Sender: news@ibmpa.awdpa.ibm.com (News Master)
  7. Organization: IBM PS Programming, Palo Alto
  8. References: <1992Aug7.213644.12166@ncs.com> <1911@coyote.UUCP> <8eUyzLa00VpOE3bEgN@andrew.cmu.edu>
  9. Date: Mon, 17 Aug 92 19:49:16 GMT
  10. Lines: 33
  11.  
  12. In article <8eUyzLa00VpOE3bEgN@andrew.cmu.edu> rr2b+@andrew.cmu.edu (Robert Andrew Ryan) writes:
  13. >Excerpts from netnews.comp.unix.aix: 8-Aug-92 Re: AIX 3.2 - Can't use
  14. >NUL.. Sam Drake@drake.almaden. (1440)
  15. >
  16. >In general, the '6000 core dumps when a null pointer is de-referenced.  
  17. >
  18. >My 530 at 3.1.5 (7?) seems to dereference NULL pointers, returning what
  19. >is for all intents and purposes garbage.  (It does die on assignments
  20. >through NULL pointers though, thankfully.)  I would be happy to find out
  21. >I'm wrong, or that there is something I can do about this :-)
  22.  
  23.     Actually, I believe that dereferencing a NULL pointer on a 6000 MAY
  24. result in a core dump, but doesn't always.  The reason is that older hardware
  25. allowed the NULL dereference (page 0 was always available read-only, as I 
  26. recall), but that in newer machines, page 0 is NOT readable by the program (or
  27. something along those lines that causes a dereference of NULL to cause a core
  28. dump).
  29.  
  30.     Thus, and this makes life really interesting, your code may or may not
  31. core dump, depending on the machine.
  32.  
  33.     Henry Spencer's famous quote comes to mind (from memory, with apologies
  34. to Henry if I mess it up):
  35.  
  36.     "Thou shalt forsake and renounce the vile heresy that claimeth: 'All the
  37. world's a VAX.'..."
  38.  
  39.     Clear as mud now??  :-)
  40.  
  41. Steve DeJarnett            Internet: steve@ibmpa.awdpa.ibm.com
  42. IBM PS Multimedia Palo Alto    UUCP:      uunet!ibmpa.awdpa.ibm.com!steve
  43. (415) 855-3510            IBM VNET: dejarnet at austin (only if you must)
  44. These opinions are my own.  I doubt IBM wants them.......
  45.