home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / aix / 8854 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  1.8 KB

  1. Path: sparky!uunet!mcsun!sun4nl!orcenl!dk.oracle.com!bengsig
  2. From: bengsig@dk.oracle.com (Bjorn Engsig)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: Debuging Segmentation Violation Fault
  5. Keywords: Segmentation Violation
  6. Message-ID: <1992Aug17.102437.21287@dk.oracle.com>
  7. Date: 17 Aug 92 10:24:37 GMT
  8. References: <1992Aug14.040021.25316@mcs.kent.edu>
  9. Sender: news@dk.oracle.com (News Administrator)
  10. Reply-To: bengsig@dk.oracle.com (Bjorn Engsig)
  11. Organization: Oracle Denmark
  12. Lines: 26
  13. Nntp-Posting-Host: dkunix9.dk.oracle.com
  14.  
  15. Article <1992Aug14.040021.25316@mcs.kent.edu> by jhuang@Chaos.mcs.kent.edu (Jing Huang) says:
  16. |it keeps giving me this "segmentation violation". I ran "dbx" to see if I can
  17. |get some clue, it gave me something like:
  18. |
  19. |segmentation violation in malloc_y at 0xd00d43f0
  20. |0xd00d43f0 (malloc_y+0x2a8) 7c7c45aa       stsi   r3,r28,0x8
  21. In 99% of the cases when you get segmentation violation (or bus error) in
  22. malloc, it's because you previously malloc'ed less than you actually used.
  23. In some systems (including AIX 3.1), this was not always harmful, as malloc
  24. often gave you (much) more than you asked for.  In other systems (including
  25. AIX 3.2), malloc only gives you very little more than you asked for.  If you
  26. are on 3.2, try running your program with the MALLOCTYPE=3.1 environment--
  27. if that makes your problem disappear, then you surely ask for less than
  28. you use.
  29.  
  30. BTW, 78.5% of all statistics are made up.
  31. |
  32. |    I am desperate. Could someone tell me what other things I should do
  33. |beyond these two lines? Or maybe what books or manuals should I read to get
  34. |more information?
  35. It will most likely be very beneficial for you to learn how to use the
  36. debugger (dbx).
  37. -- 
  38. Bjorn Engsig,        Internet: bengsig@oracle.com
  39. ORACLE Corporation.    BANG-net: uunet!oracle!bengsig
  40.             Private : bjorn@login.dkuug.dk.
  41.