[Top][All Lists]

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

Re: [gnu-quality] valgrind

From: Jim Meyering
Subject: Re: [gnu-quality] valgrind
Date: Tue, 16 Nov 2010 19:12:59 +0100

Simon Josefsson wrote:
> Thanks Karl for getting things up and running!
> address@hidden (Karl Berry) writes:
>> - how to valgrind to track serious memory bugs
> Small starting pointer below.
> I'm not sure what format to use.  A texinfo document seems overkill for
> this, but a text file seems to simple.

I agree.  Maybe something like org-mode?
It has decent mark-up and can be rendered in many different formats.

> Valgrind
> --------

Good start.  One suggestion:

> Valgrind ( is a dynamic analysis tool, which means
> it is used during run-time and without any re-compilation.  It is
> typically only useful to check compiled languages that supports
> low-level memory management, like C and C++.  Valgrind can find many
> memory management and threading bugs.  The simplest way is to run
> Valgrind manually on your application, for example:
> $ valgrind ./foo --bar

$ valgrind -- ./foo --bar

> It will print out a human readable summary.
> Automatic use of Valgrind for self-checks
> -----------------------------------------
> Gnulib contains a module called "valgrind" which provides a
> "valgrind-tests.m4" file that will search for the valgrind tool and
> provides the VALGRIND variable to contain commands used to launch it.
> By default it runs valgrind in quiet mode to avoid output when there is
> no problem.  The variable can be used in your tests/ like
> this:
> This will cause all your self-tests to be run under Valgrind.  Any
> serious bug will trigger an error message.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]