home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sgi / 18254 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.2 KB

  1. Path: sparky!uunet!sdrc!thor!scjones
  2. From: scjones@thor.sdrc.com (Larry Jones)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: why is malloc() core dumping me?
  5. Message-ID: <2420@sdrc.COM>
  6. Date: 21 Dec 92 19:47:45 GMT
  7. References: <1992Dec18.132718.18673@husc3.harvard.edu>
  8. Sender: news@sdrc.COM
  9. Distribution: usa
  10. Lines: 17
  11.  
  12. In article <1992Dec18.132718.18673@husc3.harvard.edu>, mlevin@husc8.harvard.edu (Michael Levin) writes:
  13. >     I have a C program on an SGI Iris, which is core-dumping
  14. > ("segmentation fault"). I have localized this problem to a single
  15. > statement (by means of putting "printf()"s around it - we have no
  16. > visual debugger). The statement is:
  17. > p = (char *) malloc(1024);
  18.  
  19. This indicates that you have corrupted the internal data structures that
  20. malloc uses to keep track of allocated and freed memory, probably by
  21. writing past the end of an allocated block.  I suggest you find a copy
  22. of Conor Cahill's debugging malloc library -- it's been posted to one of
  23. the comp.sources groups -- it's invaluable in tracking down this kind of
  24. problem.
  25. ----
  26. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  27. larry.jones@sdrc.com  or  ...uunet!sdrc!larry.jones
  28. See if we can sell Mom and Dad into slavery for a star cruiser. -- Calvin
  29.