From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,46fb2397c46d4608 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-02-22 07:23:09 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!math.ohio-state.edu!caen!crl.dec.com!crl.dec.com!jac.zko.dec.com!lueck From: lueck@gurgi.zk3.dec.com (Greg Lueck Development Environment) Newsgroups: comp.unix.osf.osf1 Subject: Re: Help on program development... Date: 22 Feb 1995 15:23:09 GMT Organization: Digital Equipment Corporation Distribution: world Message-ID: <3ifkst$gmv@jac.zko.dec.com> References: <1995Feb21.132048.1@ssrl01> Reply-To: lueck@zk3.dec.com (Greg Lueck Development Environment) NNTP-Posting-Host: gurgi.zk3.dec.com X-Newsreader: mxrn 6.18-5 Tony, The unusual parameter information you see in the stack backtrace almost certainly has nothing to do with the bug you are tracking down. The routine calloc() exists in the system library and the system libraries are not compiled with debug information. Thus, there is not enough information for the debuggers to tell what parameters were passed to calloc(). Dbx (I believe) prints out the contents of five stack locations that may, or may not contain useful parameter information. It's usually best to ignore this information. Decladebug simply does not print any parameter information when it doesn't know the parameters. Segmentation faults in the memory allocation routines (malloc, calloc, free, realloc) are usually a delayed reaction to a previous bug in your application. Doing illegal things like free'ing something that was never allocated or writing beyond the end of an allocated buffer can cause the internal data structures in the memory allocation routines to become corrupt. This usually results in a segmentation fault later on when you call malloc(), calloc(), free(), or realloc(). There are tools that can help you debug such a problem. There is a tool called Third Degree on OSF/1 V3.0 and later which is designed to locate memory allocation errors like this. The Third Degree tool is layered on another tool called Atom. You get both tools when you install the ATMBASE300 subset from the base operating system CD. There is documentation describing Third Degree in /usr/lib/atom/doc/3rd.ps. There is also a manpage for the Third Degree tool in /usr/lib/atom/man/man1/third.1. -- ------------------------------------------------------------------------------- Greg Lueck Opinions expressed herein are my own. lueck@zk3.dec.com ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- Greg Lueck Opinions expressed herein are my own. lueck@zk3.dec.com -------------------------------------------------------------------------------