[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ITP: debauch - a malloc debugger



Hi,

I intent to package the above mentioned debugger. Here's an excerpt from
the README:

- - - - - - - - Snip here to damage your screeen - - - - - - - - 
Debauch is a malloc debugger.  It is based on code from "memleak" from the
XFree86 distribution (originally by Keith Packard of the MIT X
Consortium), but has been significantly altered such that a name change
seemed appropriate.  The name debauch was chosen in contrast to a
commercial memory debugger "purify", and for a bad pun with de-botch
(i.e. help you fix places where you've botched your code).

Debauch consists of a dynamic library (libdebauch.so) and a shell script.
The shell script relies on the run-time linker understanding LD_PRELOAD
such that libdebauch.so's memory allocation functions will override the
standard C ones.

The advantage of this approach over other memory-debugging libraries is
that most other memory debuggers require wrapping malloc / realloc /
calloc / free with customized versions, which requires a
recompile relink.  The wrapping approach also will not work for C library
functions such as strdup without re-compiling the C library (and any other
libraries such as X, Xt, etc) with the wrapped versions.

Debauch will catch *any* calls to malloc and friends since it overrides
the versions defined in the C library, and best of all, it doesn't require
manually relinking your application, but relies on the run-time linker to
handle that for you.
- - - - - - - - Snip here to damage your screeen - - - - - - - - 

Cheers
       Christian
-- 
********************************************************************
* Christian Kurz                          Debian Developer/QA-Team *
*         Use Debian - a free Operating System for your PC         *
********************************************************************


Reply to: