sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1 | |
sewardj | 3a359fe | 2002-07-25 22:45:35 +0000 | [diff] [blame] | 2 | Release notes for Valgrind, version 1.0.0 |
| 3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 4 | KDE3 developers: please read also README_KDE3_FOLKS for guidance |
| 5 | about how to debug KDE3 applications with Valgrind. |
| 6 | |
sewardj | 365a851 | 2002-07-01 08:30:05 +0000 | [diff] [blame] | 7 | If you are building a binary package of Valgrind for distribution, |
| 8 | please read README_PACKAGERS. It contains some important information. |
| 9 | |
njn | e43d3ae | 2003-05-05 13:04:49 +0000 | [diff] [blame] | 10 | If you are developing Valgrind, please read README_DEVELOPERS. It contains |
| 11 | some useful information. |
| 12 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 13 | For instructions on how to build/install, see the end of this file. |
| 14 | |
sewardj | 3a359fe | 2002-07-25 22:45:35 +0000 | [diff] [blame] | 15 | Valgrind works best on systems with glibc-2.1.X or 2.2.X, and with gcc |
| 16 | versions prior to 3.1. gcc-3.1 works, but generates code which causes |
| 17 | valgrind to report many false errors. For now, try to use a gcc prior |
| 18 | to 3.1; if you can't, at least compile your application without |
| 19 | optimisation. Valgrind-1.0.X also can't handle glibc-2.3.X systems. |
| 20 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 21 | |
| 22 | Executive Summary |
| 23 | ~~~~~~~~~~~~~~~~~ |
| 24 | Valgrind is a tool to help you find memory-management problems in your |
| 25 | programs. When a program is run under Valgrind's supervision, all |
| 26 | reads and writes of memory are checked, and calls to |
| 27 | malloc/new/free/delete are intercepted. As a result, Valgrind can |
| 28 | detect 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 [] |
sewardj | 4018392 | 2002-06-19 20:52:32 +0000 | [diff] [blame] | 37 | Some abuses of the POSIX pthread API |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 38 | |
| 39 | Problems like these can be difficult to find by other means, often |
| 40 | lying undetected for long periods, then causing occasional, |
| 41 | difficult-to-diagnose crashes. |
| 42 | |
| 43 | When Valgrind detects such a problem, it can, if you like, attach GDB |
| 44 | to your program, so you can poke around and see what's going on. |
| 45 | |
| 46 | Valgrind is closely tied to details of the CPU, operating system and |
| 47 | to a less extent, compiler and basic C libraries. This makes it |
| 48 | difficult to make it portable, so I have chosen at the outset to |
| 49 | concentrate on what I believe to be a widely used platform: Red Hat |
| 50 | Linux 7.2, on x86s. I believe that it will work without significant |
| 51 | difficulty on other x86 GNU/Linux systems which use the 2.4 kernel and |
sewardj | 365a851 | 2002-07-01 08:30:05 +0000 | [diff] [blame] | 52 | GNU libc 2.2.X, for example SuSE 7.1 and Mandrake 8.0. This version |
| 53 | 1.0 release is known to work on Red Hats 6.2, 7.2 and 7.3, at the very |
| 54 | least. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 55 | |
| 56 | Valgrind is licensed under the GNU General Public License, version 2. |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 57 | Read the file COPYING in the source distribution for details. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 58 | |
| 59 | |
| 60 | Documentation |
| 61 | ~~~~~~~~~~~~~ |
| 62 | A comprehensive user guide is supplied. Point your browser at |
| 63 | docs/index.html. If your browser doesn't like frames, point it |
sewardj | 4018392 | 2002-06-19 20:52:32 +0000 | [diff] [blame] | 64 | instead at docs/manual.html. There's also detailed, although somewhat |
| 65 | out of date, documentation of how valgrind works, in |
| 66 | docs/techdocs.html. |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 67 | |
| 68 | |
| 69 | Building and installing it |
| 70 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 71 | If you install from CVS : |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 72 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 73 | 0. cd into the source directory |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 74 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 75 | 1. Run ./autogen.sh to setup the environment (you need the standard |
| 76 | autoconf tools to do so) |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 77 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 78 | If you install from a tar.gz archive: |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 79 | |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 80 | 2. Run ./configure, with some options if you wish. The standard |
sewardj | 4018392 | 2002-06-19 20:52:32 +0000 | [diff] [blame] | 81 | options are documented in the INSTALL file. The only interesting |
| 82 | one is the usual --prefix=/where/you/want/it/installed |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 83 | |
| 84 | 3. Do "make" |
| 85 | |
sewardj | 4018392 | 2002-06-19 20:52:32 +0000 | [diff] [blame] | 86 | 4. Do "make install", possibly as root if the destination permissions |
| 87 | require that. |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 88 | |
| 89 | 5. See if it works. Try "valgrind ls -l". Either this works, |
| 90 | or it bombs out complaining it can't find argc/argv/envp. |
sewardj | 4018392 | 2002-06-19 20:52:32 +0000 | [diff] [blame] | 91 | In that case, mail me a bug report. |
gobry | e721a52 | 2002-03-22 13:38:30 +0000 | [diff] [blame] | 92 | |
sewardj | 4018392 | 2002-06-19 20:52:32 +0000 | [diff] [blame] | 93 | Important! Do not move the valgrind installation into a place |
| 94 | different from that specified by --prefix at build time. This will |
| 95 | cause things to break in subtle ways, mostly when Valgrind handles |
| 96 | fork/exec calls. |
gobry | 69896d5 | 2002-04-05 06:56:07 +0000 | [diff] [blame] | 97 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 98 | |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 99 | Julian Seward (jseward@acm.org) |
sewardj | 365a851 | 2002-07-01 08:30:05 +0000 | [diff] [blame] | 100 | 1 July 2002 |