On Sun, 14 Jan 2001, Christoph Reichenbach wrote:
> Ah, thanks! However, this is mostly for finding dereferenciations of
> invalid pointers etc; the situation we appear to be having is that a
> pointer to a valid allocated memory block is being overwritten without the
> memory block being freed.
I there used to be a 30-trial version of Purify for Linux, but a visit
to the site shows nothing (not even a Linux port of Purify). So one
possibility is to check for leaks on Solaris/HP-UX/IRIX or maybe try
Checker (but the last time I tried checker -- two years ago or so --
it was not very reliable).
Package: gccchecker
Priority: extra
Section: devel
Version: 0.9.9.1.20001209-1
Description: Memory access debugger for C language development
Checker automatically finds:
.
* null pointer dereferences (read, write, and execute accesses)
* writes to read-only memory
* accesses to free blocks (read, write, and execute)
* reads/writes to uninitialized bytes (in automatic and dynamic memory)
* reads/writes to "red zones" (in automatic and dynamic memory)
* reads/writes/executes outside memory segments
* free called with address not obtained from malloc
* free an already freed block
* ...and many more!
.
Checker's main disadvantage is that it causes the program to run much
slower. You can compile your program to use Checker by replacing calls
to gcc by calls to checkergcc. Please read the documentation in
/usr/share/doc/gccchecker.
.
This version of Checker works only with GNU gcc 2.95 and later. This
version of Checker has limited support for C++. There is no support
for libstdc++.