From: lueck@gurgi.zk3.dec.com (Greg Lueck Development Environment)
Subject: Re: Help on program development...
Date: 22 Feb 1995 15:23:09 GMT [thread overview]
Message-ID: <3ifkst$gmv@jac.zko.dec.com> (raw)
In-Reply-To: 1995Feb21.132048.1@ssrl01
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
-------------------------------------------------------------------------------
next prev parent reply other threads:[~1995-02-22 15:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-02-21 21:20 Help on program development Tony Cox
1995-02-22 15:23 ` Greg Lueck Development Environment [this message]
1995-02-27 20:36 ` Tim Lucia
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox