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