blob: 763d3b2806bc7410dd271829ccadb3b8afc34b78 [file] [log] [blame]
sewardjde4a1d02002-03-22 01:27:54 +00001
sewardj40183922002-06-19 20:52:32 +00002Release notes for Valgrind, version 1.0
3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sewardjde4a1d02002-03-22 01:27:54 +00004
5KDE3 developers: please read also README_KDE3_FOLKS for guidance
6about how to debug KDE3 applications with Valgrind.
7
8For instructions on how to build/install, see the end of this file.
9
10
11Executive Summary
12~~~~~~~~~~~~~~~~~
13Valgrind is a tool to help you find memory-management problems in your
14programs. When a program is run under Valgrind's supervision, all
15reads and writes of memory are checked, and calls to
16malloc/new/free/delete are intercepted. As a result, Valgrind can
17detect problems such as:
18
19 Use of uninitialised memory
20 Reading/writing memory after it has been free'd
21 Reading/writing off the end of malloc'd blocks
22 Reading/writing inappropriate areas on the stack
23 Memory leaks -- where pointers to malloc'd blocks are lost forever
24 Passing of uninitialised and/or unaddressible memory to system calls
25 Mismatched use of malloc/new/new [] vs free/delete/delete []
sewardj40183922002-06-19 20:52:32 +000026 Some abuses of the POSIX pthread API
sewardjde4a1d02002-03-22 01:27:54 +000027
28Problems like these can be difficult to find by other means, often
29lying undetected for long periods, then causing occasional,
30difficult-to-diagnose crashes.
31
32When Valgrind detects such a problem, it can, if you like, attach GDB
33to your program, so you can poke around and see what's going on.
34
35Valgrind is closely tied to details of the CPU, operating system and
36to a less extent, compiler and basic C libraries. This makes it
37difficult to make it portable, so I have chosen at the outset to
38concentrate on what I believe to be a widely used platform: Red Hat
39Linux 7.2, on x86s. I believe that it will work without significant
40difficulty on other x86 GNU/Linux systems which use the 2.4 kernel and
41GNU libc 2.2.X, for example SuSE 7.1 and Mandrake 8.0. Red Hat 6.2 is
42also supported. It has worked in the past, and probably still does,
43on RedHat 7.1 and 6.2. Note that I haven't compiled it on RedHat 7.1
44and 6.2 for a while, so they may no longer work now.
45
46Valgrind is licensed under the GNU General Public License, version 2.
47Read the file LICENSE in the source distribution for details.
48
49
50Documentation
51~~~~~~~~~~~~~
52A comprehensive user guide is supplied. Point your browser at
53docs/index.html. If your browser doesn't like frames, point it
sewardj40183922002-06-19 20:52:32 +000054instead at docs/manual.html. There's also detailed, although somewhat
55out of date, documentation of how valgrind works, in
56docs/techdocs.html.
sewardjde4a1d02002-03-22 01:27:54 +000057
58
59Building and installing it
60~~~~~~~~~~~~~~~~~~~~~~~~~~
gobrye721a522002-03-22 13:38:30 +000061If you install from CVS :
sewardjde4a1d02002-03-22 01:27:54 +000062
gobrye721a522002-03-22 13:38:30 +000063 0. cd into the source directory
sewardjde4a1d02002-03-22 01:27:54 +000064
gobrye721a522002-03-22 13:38:30 +000065 1. Run ./autogen.sh to setup the environment (you need the standard
66 autoconf tools to do so)
sewardjde4a1d02002-03-22 01:27:54 +000067
gobrye721a522002-03-22 13:38:30 +000068If you install from a tar.gz archive:
sewardjde4a1d02002-03-22 01:27:54 +000069
gobrye721a522002-03-22 13:38:30 +000070 2. Run ./configure, with some options if you wish. The standard
sewardj40183922002-06-19 20:52:32 +000071 options are documented in the INSTALL file. The only interesting
72 one is the usual --prefix=/where/you/want/it/installed
gobrye721a522002-03-22 13:38:30 +000073
74 3. Do "make"
75
sewardj40183922002-06-19 20:52:32 +000076 4. Do "make install", possibly as root if the destination permissions
77 require that.
gobrye721a522002-03-22 13:38:30 +000078
79 5. See if it works. Try "valgrind ls -l". Either this works,
80 or it bombs out complaining it can't find argc/argv/envp.
sewardj40183922002-06-19 20:52:32 +000081 In that case, mail me a bug report.
gobrye721a522002-03-22 13:38:30 +000082
sewardj40183922002-06-19 20:52:32 +000083Important! Do not move the valgrind installation into a place
84different from that specified by --prefix at build time. This will
85cause things to break in subtle ways, mostly when Valgrind handles
86fork/exec calls.
gobry69896d52002-04-05 06:56:07 +000087
sewardjde4a1d02002-03-22 01:27:54 +000088
sewardjde4a1d02002-03-22 01:27:54 +000089Julian Seward (jseward@acm.org)
sewardj40183922002-06-19 20:52:32 +00009019 June 2002