home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sun / admin / 10674 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  2.1 KB

  1. Xref: sparky comp.sys.sun.admin:10674 comp.sys.sun.apps:3065 comp.sys.sun.misc:6450
  2. Newsgroups: comp.sys.sun.admin,comp.sys.sun.apps,comp.sys.sun.misc
  3. Path: sparky!uunet!cs.utexas.edu!geraldo.cc.utexas.edu!slcs.slb.com!leo.asc.slb.com!sjsca4!poffen
  4. From: poffen@sj.ate.slb.com (Russ Poffenberger)
  5. Subject: Re: SEGV inside malloc() - This shouldn't happen!
  6. Message-ID: <1993Jan22.215835.25188@sj.ate.slb.com>
  7. Followup-To: comp.sys.sun.admin,comp.sys.sun.apps,comp.sys.sun.misc
  8. Sender: news@sj.ate.slb.com
  9. Organization: Schlumberger Technologies, ATE division, San Jose, Ca.
  10. X-Newsreader: TIN [version 1.1 PL7]
  11. References: <C1893A.5t9@vti.com>
  12. Distribution: na
  13. Date: Fri, 22 Jan 93 21:58:35 GMT
  14. Lines: 35
  15.  
  16. Conor P. Cahill (cpcahil@vti.com) wrote:
  17. : mike@sdd.comsat.com (Mike Stennett) writes:
  18. : >I am currently porting a program to a SparcStation 2 running SUN/OS 4.1.2.
  19. : >The program is written in C, Pascal, and Fortran.  I am using all SUN 
  20. : >compilers.  My problem is I am getting segmentation faults within malloc.
  21. : >Now I have been writing C programs for 4 years and know that malloc should
  22. : >never cause a segmentation faults.
  23. : This is almost always due to the fact that you have overrun a previous pointer
  24. : returned by malloc and thereby corrupted the "arena" managed by malloc and 
  25. : free.  
  26. : The solution to your problem is to find where you are overrunning your
  27. : data area and fix it.  
  28. : There are several products available to help you in this task including:
  29. : a) dbmalloc     - a debugging version of malloc posted to comp.sources.misc
  30. :            in Sept of 92 (Volume 32, issues 6-15).  It should be
  31. :           available at an archive site near you.
  32. : b) SENTINEL    - our commercial memory access debugger.  Send email, or
  33. :           call 800-296-3000 if you would like additional information.
  34.  
  35. The best product I have seen is called "purify". It is not a debugger, but
  36. rather instruments your module at link time. No funny macros, no funny
  37. switches, just a change of your link line from "cc ..." to "purify cc ...",
  38. then run the program. It will report memory overwrites, uninitialized
  39. pointer usage, and memory leaks.
  40.  
  41. Pure Software
  42. (415)903-5100
  43. support@pure.com
  44. info@pure.com
  45.