Re: Suggestions for C malloc debugging tool

colas@aye.inria.fr (Colas Nahaboo)
9 Jan 1997 22:26:09 -0500

          From comp.compilers

Related articles
Suggestions for C malloc debugging tool f81@ix.urz.uni-heidelberg.de (1997-01-07)
Re: Suggestions for C malloc debugging tool vlaures@igcom.fr (Laurent Sabarthez) (1997-01-09)
Re: Suggestions for C malloc debugging tool jlilley@empathy.com (1997-01-09)
Re: Suggestions for C malloc debugging tool colas@aye.inria.fr (1997-01-09)
Re: Suggestions for C malloc debugging tool lijnzaad@ebi.ac.uk (Philip Lijnzaad) (1997-01-12)
Re: Suggestions for C malloc debugging tool dickey@clark.net (T.E.Dickey) (1997-01-12)
Re: Suggestions for C malloc debugging tool stephens@math.ruu.nl (1997-01-12)
Re: Suggestions for C malloc debugging tool cef@geodesic.com (Charles Fiterman) (1997-01-12)
Re: Suggestions for C malloc debugging tool patil@ch.hp.com (Harish Patil) (1997-01-22)
Re: Suggestions for C malloc debugging tool taustin@ichips.intel.com (1997-01-25)
[1 later articles]
| List of all articles for this month |

From: colas@aye.inria.fr (Colas Nahaboo)
Newsgroups: comp.compilers
Date: 9 Jan 1997 22:26:09 -0500
Organization: Koala Project, Dyade/Bull
References: 97-01-050
Keywords: C, debug, storage

f81@ix.urz.uni-heidelberg.de (Joerg Schoen ) writes:
|> Now suggest a debugging tool as follows: A "preprocessor" that
|> processes C to C and inserts a validity check prior to every memory
|> access in the code.


I think you can stop your work and try to do something more productive...


|> However, some questions of usefulness remain. First of all, does
|> something like that already exist? I know "Purify",


A tool exactly like you describe (modifying C and C++ source) has been
existing for quite some time, it is called "insure++" (formerly
"insight") and works quite well, see http://www.parasoft.com/


Purify only modifies the produced native code, so it is not as
portable, and detects less errors, but is easier to use, and very
robust (and doesnt slow down the compilation process).


if you write:
x = malloc(4);
x = malloc(5);
insure++ will stop *before* the second line, warning you that you are
going to loose a ref to a malloced block. With purify you will see that
there is a leak at the end of program execution.


Other "similar" (less powerful) tools exist in public domain in the
linux community (checker, electric fence...). There may be other
commercial products, but I dont have first-hand experience with them.


--
Colas Nahaboo, Koala/Dyade/Bull @ INRIA Sophia, http://www.inria.fr/koala/colas
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.