blob: 32b21ecf6261bac1e4d5522b2e8048c44eb1bb83 [file] [log] [blame]
sewardj21082ff2004-10-19 13:11:35 +00001
2Release notes for Valgrind
3~~~~~~~~~~~~~~~~~~~~~~~~~~
4If you are building a binary package of Valgrind for distribution,
5please read README_PACKAGERS. It contains some important information.
6
7If you are developing Valgrind, please read README_DEVELOPERS. It contains
8some useful information.
9
10For instructions on how to build/install, see the end of this file.
11
12Valgrind works on most, reasonably recent Linux setups. If you have
13problems, consult FAQ.txt to see if there are workarounds.
14
15Executive Summary
16~~~~~~~~~~~~~~~~~
17Valgrind is a GPL'd system for debugging and profiling x86-Linux programs.
18With the tools that come with Valgrind, you can automatically detect
19many memory management and threading bugs, avoiding hours of frustrating
20bug-hunting, making your programs more stable. You can also perform
21detailed profiling to help speed up your programs.
22
23The Valgrind distribution includes five tools: two memory error
24detectors, a thread error detector, a cache profiler and a heap profiler.
25Several other tools have been built with Valgrind.
26
27To give you an idea of what Valgrind tools do, when a program is run
28under the supervision of the first memory error detector tool, all reads
29and writes of memory are checked, and calls to malloc/new/free/delete
30are intercepted. As a result, it can detect problems such as:
31
32 Use of uninitialised memory
33 Reading/writing memory after it has been free'd
34 Reading/writing off the end of malloc'd blocks
35 Reading/writing inappropriate areas on the stack
36 Memory leaks -- where pointers to malloc'd blocks are lost forever
37 Passing of uninitialised and/or unaddressible memory to system calls
38 Mismatched use of malloc/new/new [] vs free/delete/delete []
39 Overlaps of arguments to strcpy() and related functions
40 Some abuses of the POSIX pthread API
41
42Problems like these can be difficult to find by other means, often
43lying undetected for long periods, then causing occasional,
44difficult-to-diagnose crashes. When one of these errors occurs, you can
45attach GDB to your program, so you can poke around and see what's going
46on.
47
48Valgrind is closely tied to details of the CPU, operating system and
49to a less extent, compiler and basic C libraries. This makes it
50difficult to make it portable, so I have chosen at the outset to
51concentrate on what I believe to be a widely used platform: x86/Linux.
52
53Valgrind is licensed under the GNU General Public License, version 2.
54Read the file COPYING in the source distribution for details.
55
56
57Documentation
58~~~~~~~~~~~~~
59A comprehensive user guide is supplied. Point your browser at
60$PREFIX/share/doc/valgrind/manual.html, where $PREFIX is whatever you
61specified with --prefix= when building.
62
63
64Building and installing it
65~~~~~~~~~~~~~~~~~~~~~~~~~~
66To install from CVS :
67
68 0. Check out the code from CVS, following the instructions at
69 http://developer.kde.org/source/anoncvs.html. The 'modulename' is
70 "valgrind".
71
72 1. cd into the source directory.
73
74 2. Run ./autogen.sh to setup the environment (you need the standard
75 autoconf tools to do so).
76
77To install from a tar.bz2 distribution:
78
79 3. Run ./configure, with some options if you wish. The standard
80 options are documented in the INSTALL file. The only interesting
81 one is the usual --prefix=/where/you/want/it/installed.
82
83 4. Do "make".
84
85 5. Do "make install", possibly as root if the destination permissions
86 require that.
87
88 6. See if it works. Try "valgrind --tool=memcheck ls -l". Either
89 this works, or it bombs out with some complaint. In that case,
90 please let us know (see valgrind.kde.org/bugs.html).
91
92Important! Do not move the valgrind installation into a place
93different from that specified by --prefix at build time. This will
94cause things to break in subtle ways, mostly when Valgrind handles
95fork/exec calls.
96
97
98Julian Seward (jseward@acm.org)
99Nick Nethercote (njn25@cam.ac.uk)
100Jeremy Fitzhardinge (jeremy@goop.org)