blob: 7eee2c426d46064c50c4ac20e624860a85dc799e [file] [log] [blame]
sewardjde4a1d02002-03-22 01:27:54 +00001
sewardj3a359fe2002-07-25 22:45:35 +00002Release notes for Valgrind, version 1.0.0
3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sewardjde4a1d02002-03-22 01:27:54 +00004KDE3 developers: please read also README_KDE3_FOLKS for guidance
5about how to debug KDE3 applications with Valgrind.
6
sewardj365a8512002-07-01 08:30:05 +00007If you are building a binary package of Valgrind for distribution,
8please read README_PACKAGERS. It contains some important information.
9
njne43d3ae2003-05-05 13:04:49 +000010If you are developing Valgrind, please read README_DEVELOPERS. It contains
11some useful information.
12
sewardjde4a1d02002-03-22 01:27:54 +000013For instructions on how to build/install, see the end of this file.
14
sewardj3a359fe2002-07-25 22:45:35 +000015Valgrind works best on systems with glibc-2.1.X or 2.2.X, and with gcc
16versions prior to 3.1. gcc-3.1 works, but generates code which causes
17valgrind to report many false errors. For now, try to use a gcc prior
18to 3.1; if you can't, at least compile your application without
19optimisation. Valgrind-1.0.X also can't handle glibc-2.3.X systems.
20
sewardjde4a1d02002-03-22 01:27:54 +000021
22Executive Summary
23~~~~~~~~~~~~~~~~~
24Valgrind is a tool to help you find memory-management problems in your
25programs. When a program is run under Valgrind's supervision, all
26reads and writes of memory are checked, and calls to
27malloc/new/free/delete are intercepted. As a result, Valgrind can
28detect problems such as:
29
30 Use of uninitialised memory
31 Reading/writing memory after it has been free'd
32 Reading/writing off the end of malloc'd blocks
33 Reading/writing inappropriate areas on the stack
34 Memory leaks -- where pointers to malloc'd blocks are lost forever
35 Passing of uninitialised and/or unaddressible memory to system calls
36 Mismatched use of malloc/new/new [] vs free/delete/delete []
sewardj40183922002-06-19 20:52:32 +000037 Some abuses of the POSIX pthread API
sewardjde4a1d02002-03-22 01:27:54 +000038
39Problems like these can be difficult to find by other means, often
40lying undetected for long periods, then causing occasional,
41difficult-to-diagnose crashes.
42
43When Valgrind detects such a problem, it can, if you like, attach GDB
44to your program, so you can poke around and see what's going on.
45
46Valgrind is closely tied to details of the CPU, operating system and
47to a less extent, compiler and basic C libraries. This makes it
48difficult to make it portable, so I have chosen at the outset to
49concentrate on what I believe to be a widely used platform: Red Hat
50Linux 7.2, on x86s. I believe that it will work without significant
51difficulty on other x86 GNU/Linux systems which use the 2.4 kernel and
sewardj365a8512002-07-01 08:30:05 +000052GNU libc 2.2.X, for example SuSE 7.1 and Mandrake 8.0. This version
531.0 release is known to work on Red Hats 6.2, 7.2 and 7.3, at the very
54least.
sewardjde4a1d02002-03-22 01:27:54 +000055
56Valgrind is licensed under the GNU General Public License, version 2.
njn25e49d8e72002-09-23 09:36:25 +000057Read the file COPYING in the source distribution for details.
sewardjde4a1d02002-03-22 01:27:54 +000058
59
60Documentation
61~~~~~~~~~~~~~
62A comprehensive user guide is supplied. Point your browser at
63docs/index.html. If your browser doesn't like frames, point it
sewardj40183922002-06-19 20:52:32 +000064instead at docs/manual.html. There's also detailed, although somewhat
65out of date, documentation of how valgrind works, in
66docs/techdocs.html.
sewardjde4a1d02002-03-22 01:27:54 +000067
68
69Building and installing it
70~~~~~~~~~~~~~~~~~~~~~~~~~~
njn0dd9cf12003-07-21 10:17:58 +000071To install from CVS :
sewardjde4a1d02002-03-22 01:27:54 +000072
njn0dd9cf12003-07-21 10:17:58 +000073 0. Check out the code from CVS, following the instructions at
muellerbf4621d2003-10-29 16:03:51 +000074 http://developer.kde.org/source/anoncvs.html. The 'modulename' is
njn0dd9cf12003-07-21 10:17:58 +000075 "valgrind".
sewardjde4a1d02002-03-22 01:27:54 +000076
njn0dd9cf12003-07-21 10:17:58 +000077 1. cd into the source directory.
sewardjde4a1d02002-03-22 01:27:54 +000078
njn0dd9cf12003-07-21 10:17:58 +000079 2. Run ./autogen.sh to setup the environment (you need the standard
80 autoconf tools to do so).
sewardjde4a1d02002-03-22 01:27:54 +000081
njn0dd9cf12003-07-21 10:17:58 +000082To install from a tar.gz archive:
83
84 3. Run ./configure, with some options if you wish. The standard
sewardj40183922002-06-19 20:52:32 +000085 options are documented in the INSTALL file. The only interesting
njn0dd9cf12003-07-21 10:17:58 +000086 one is the usual --prefix=/where/you/want/it/installed.
gobrye721a522002-03-22 13:38:30 +000087
njn0dd9cf12003-07-21 10:17:58 +000088 4. Do "make".
gobrye721a522002-03-22 13:38:30 +000089
njn0dd9cf12003-07-21 10:17:58 +000090 5. Do "make install", possibly as root if the destination permissions
sewardj40183922002-06-19 20:52:32 +000091 require that.
gobrye721a522002-03-22 13:38:30 +000092
njn0dd9cf12003-07-21 10:17:58 +000093 6. See if it works. Try "valgrind ls -l". Either this works,
gobrye721a522002-03-22 13:38:30 +000094 or it bombs out complaining it can't find argc/argv/envp.
sewardj40183922002-06-19 20:52:32 +000095 In that case, mail me a bug report.
gobrye721a522002-03-22 13:38:30 +000096
sewardj40183922002-06-19 20:52:32 +000097Important! Do not move the valgrind installation into a place
98different from that specified by --prefix at build time. This will
99cause things to break in subtle ways, mostly when Valgrind handles
100fork/exec calls.
gobry69896d52002-04-05 06:56:07 +0000101
sewardjde4a1d02002-03-22 01:27:54 +0000102
sewardjde4a1d02002-03-22 01:27:54 +0000103Julian Seward (jseward@acm.org)
sewardj365a8512002-07-01 08:30:05 +00001041 July 2002