From: Nicholas Nethercote Date: Wed, 3 Dec 2003 21:44:45 +0000 (+0000) Subject: Updated the README file. It had lots of out-of-date and incorrect information X-Git-Tag: svn/VALGRIND_2_1_0~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc9a6bbced2d69674a84380264ee5d93967beabc;p=thirdparty%2Fvalgrind.git Updated the README file. It had lots of out-of-date and incorrect information in it, much of it from 1.0.X days. Did it in such a way that if it doesn't get touched (and it undoubtedly won't) it won't really go out of date, eg. by removing temporary details like version numbers, dates, details of specific software incompatibilities. It's much better to be vague but correct, than precise but incorrect; having incorrect info in a file as important as the README is bad. Also removed the README_KDE3_FOLKS file because it's pretty redundant now. Also added some changes that had been made in the stable branch but not the HEAD. Did similar, but smaller changes to README_DEVELOPERS and README_PACKAGERS. Also updated the valgrind.spec.in file to use the new, post-1.0.X description in the README. Also fixed a minor omission in Addrcheck's docs. MERGE TO STABLE git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2089 --- diff --git a/Makefile.am b/Makefile.am index 1d21e9fd20..86308e69fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ regtest: check EXTRA_DIST = $(val_DATA) \ FAQ.txt \ PATCHES_APPLIED ACKNOWLEDGEMENTS \ - README_KDE3_FOLKS README_PACKAGERS \ + README_PACKAGERS \ README_MISSING_SYSCALL_OR_IOCTL TODO \ valgrind.spec valgrind.spec.in valgrind.pc.in diff --git a/README b/README index 7eee2c426d..71b9eaaf04 100644 --- a/README +++ b/README @@ -1,9 +1,6 @@ -Release notes for Valgrind, version 1.0.0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -KDE3 developers: please read also README_KDE3_FOLKS for guidance -about how to debug KDE3 applications with Valgrind. - +Release notes for Valgrind +~~~~~~~~~~~~~~~~~~~~~~~~~~ If you are building a binary package of Valgrind for distribution, please read README_PACKAGERS. It contains some important information. @@ -12,46 +9,46 @@ some useful information. For instructions on how to build/install, see the end of this file. -Valgrind works best on systems with glibc-2.1.X or 2.2.X, and with gcc -versions prior to 3.1. gcc-3.1 works, but generates code which causes -valgrind to report many false errors. For now, try to use a gcc prior -to 3.1; if you can't, at least compile your application without -optimisation. Valgrind-1.0.X also can't handle glibc-2.3.X systems. - +Valgrind works on most, reasonably recent Linux setups. If you have +problems, consult FAQ.txt to see if there are workarounds. Executive Summary ~~~~~~~~~~~~~~~~~ -Valgrind is a tool to help you find memory-management problems in your -programs. When a program is run under Valgrind's supervision, all -reads and writes of memory are checked, and calls to -malloc/new/free/delete are intercepted. As a result, Valgrind can -detect problems such as: - - Use of uninitialised memory - Reading/writing memory after it has been free'd - Reading/writing off the end of malloc'd blocks - Reading/writing inappropriate areas on the stack +Valgrind is a GPL'd system for debugging and profiling x86-Linux programs. +With the tools that come with Valgrind, you can automatically detect +many memory management and threading bugs, avoiding hours of frustrating +bug-hunting, making your programs more stable. You can also perform +detailed profiling to help speed up your programs. + +The Valgrind distribution includes four tools: two memory error +detectors, a thread error detector, and a cache profiler. Several other +tools have been built with Valgrind. + +To give you an idea of what Valgrind tools do, when a program is run +under the supervision of the first memory error detector tool, all reads +and writes of memory are checked, and calls to malloc/new/free/delete +are intercepted. As a result, it can detect problems such as: + + Use of uninitialised memory + Reading/writing memory after it has been free'd + Reading/writing off the end of malloc'd blocks + Reading/writing inappropriate areas on the stack Memory leaks -- where pointers to malloc'd blocks are lost forever Passing of uninitialised and/or unaddressible memory to system calls - Mismatched use of malloc/new/new [] vs free/delete/delete [] + Mismatched use of malloc/new/new [] vs free/delete/delete [] + Overlaps of arguments to strcpy() and related functions Some abuses of the POSIX pthread API Problems like these can be difficult to find by other means, often lying undetected for long periods, then causing occasional, -difficult-to-diagnose crashes. - -When Valgrind detects such a problem, it can, if you like, attach GDB -to your program, so you can poke around and see what's going on. +difficult-to-diagnose crashes. When one of these errors occurs, you can +attach GDB to your program, so you can poke around and see what's going +on. Valgrind is closely tied to details of the CPU, operating system and to a less extent, compiler and basic C libraries. This makes it difficult to make it portable, so I have chosen at the outset to -concentrate on what I believe to be a widely used platform: Red Hat -Linux 7.2, on x86s. I believe that it will work without significant -difficulty on other x86 GNU/Linux systems which use the 2.4 kernel and -GNU libc 2.2.X, for example SuSE 7.1 and Mandrake 8.0. This version -1.0 release is known to work on Red Hats 6.2, 7.2 and 7.3, at the very -least. +concentrate on what I believe to be a widely used platform: x86/Linux. Valgrind is licensed under the GNU General Public License, version 2. Read the file COPYING in the source distribution for details. @@ -60,10 +57,8 @@ Read the file COPYING in the source distribution for details. Documentation ~~~~~~~~~~~~~ A comprehensive user guide is supplied. Point your browser at -docs/index.html. If your browser doesn't like frames, point it -instead at docs/manual.html. There's also detailed, although somewhat -out of date, documentation of how valgrind works, in -docs/techdocs.html. +$PREFIX/share/doc/valgrind/manual.html, where $PREFIX is whatever you +specified with --prefix= when building. Building and installing it @@ -79,7 +74,7 @@ To install from CVS : 2. Run ./autogen.sh to setup the environment (you need the standard autoconf tools to do so). -To install from a tar.gz archive: +To install from a tar.bz2 distribution: 3. Run ./configure, with some options if you wish. The standard options are documented in the INSTALL file. The only interesting @@ -101,4 +96,5 @@ fork/exec calls. Julian Seward (jseward@acm.org) -1 July 2002 +Nick Nethercote (njn25@cam.ac.uk) +Jeremy Fitzhardinge (jeremy@goop.org) diff --git a/README_DEVELOPERS b/README_DEVELOPERS index 02229ec24d..87c03053e8 100644 --- a/README_DEVELOPERS +++ b/README_DEVELOPERS @@ -1,6 +1,4 @@ -5 May 2003 - Building and not installing it ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To run Valgrind without having to install it, run coregrind/valgrind (prefix diff --git a/README_KDE3_FOLKS b/README_KDE3_FOLKS deleted file mode 100644 index ec3be4638d..0000000000 --- a/README_KDE3_FOLKS +++ /dev/null @@ -1,83 +0,0 @@ - -19 June 2002 - -The purpose of this small doc is to guide you in using Valgrind to -find and fix memory management bugs in KDE3. - - --------------------------------------------------- - -Here's a getting-started-quickly checklist. It might sound daunting, -but once set up things work fairly well. - - -* You need an x86 box running a Linux 2.2 or 2.4 kernel, with glibc - 2.1.X or 2.2.X and XFree86 3.X or 4.X. In practice this means - practically any recent Linux distro. Valgrind is developed on a - vanilla Red Hat 7.2 installation, so at least works ok there. - I imagine Mandrake 8 and SuSE 7.X would be ok too. It is known to - work on Red Hats 6.2, 7.2 and 7.3, at the very least. - - -* You need a reasonably fast machine, since programs run 25-100 x - slower on Valgrind. I work with a 1133 MHz PIII with 512 M of - memory. Interactive programs like kate, konqueror, etc, are - usable, but in all, the faster your machine, the more useful - valgrind will be. - - -* You need at least 256M of memory for reasonable behaviour. Valgrind - inflates the memory use of KDE apps approximately 3-4 x, so (eg) - konqueror needs ~ 140M of memory to get started, although to be fair, - at least 40 M of that is due to reading the debug info -- this is for - a konqueror and all libraries built with -O -g. - - -* You need to compile the KDE to be debugged, using a decent gcc/g++: - - - gcc 2.96-*, which comes with Red Hat 7.2, is buggy. It sometimes - generates code with reads below %esp, even for simple functions. - This means you will be flooded with errors which are nothing to - do with your program. You can use the --workaround-gcc296-bugs=yes - flag to ignore them. See the manual for details; this is not really - a good solution. - - - I recommend you use gcc/g++ 2.95.3. It seems to compile - KDE without problems, and does not suffer from the above bug. It's - what I have been using. - - - gcc-3. 3.0.4 was observed to have a scheduling bug causing it to - occasionally generate writes below the stack pointer. gcc-3.1 seems - better in that respect. - - It's ok to build Valgrind with the default gcc on Red Hat 7.2. - - -* So: build valgrind -- see the README file. It's the standard - ./configure ; make ; make install deal. - -* Build as much of KDE+Qt as you can with -g and without -O, for - the usual reasons. - -* Use it! - /path/to/valgrind $KDEDIR/bin/kate - (or whatever). - -* If you are debugging KDE apps, be prepared for the fact that - Valgrind finds bugs in the underlying Qt (qt-copy from CVS) too. - -* Please read the Valgrind manual, docs/index.html. It contains - considerable details about how to use it, what's really going on, - etc. - -* There are some significant limitations: - - No MMX, SSE, SSE2 insns. Basically a 486 instruction set only. - - Various other minor limitations listed in the manual. - -* If you have trouble with it, please let me know (jseward@acm.org) - and I'll see if I can help you out. - - -Have fun! If you find Valgrind useful in finding and fixing bugs, -I shall consider my efforts to have been worthwhile. - -Julian Seward (jseward@acm.org) diff --git a/README_PACKAGERS b/README_PACKAGERS index c5301b93ce..c9e25d5757 100644 --- a/README_PACKAGERS +++ b/README_PACKAGERS @@ -1,6 +1,4 @@ -1 July 2002 - Greetings, packaging person! This information is aimed at people building binary distributions of Valgrind. diff --git a/addrcheck/docs/ac_main.html b/addrcheck/docs/ac_main.html index b5b19c2ed3..d540fc0051 100644 --- a/addrcheck/docs/ac_main.html +++ b/addrcheck/docs/ac_main.html @@ -25,6 +25,8 @@ errors:
  • Memory leaks -- where pointers to malloc'd blocks are lost forever
  • Mismatched use of malloc/new/new [] vs free/delete/delete []
  • +
  • Overlapping src and dst pointers in + memcpy() and related functions
  • Some misuses of the POSIX pthreads API
  • diff --git a/valgrind.spec.in b/valgrind.spec.in index 12bd3c203d..91f2307aaf 100644 --- a/valgrind.spec.in +++ b/valgrind.spec.in @@ -11,20 +11,15 @@ Buildroot: %{_tmppath}/@PACKAGE@ %description -Valgrind is a GPL'd tool to help you find memory-management problems -in your programs. When a program is run under Valgrind's supervision, -all reads and writes of memory are checked, and calls to -malloc/new/free/delete are intercepted. As a result, Valgrind can -detect problems such as: - -- Use of uninitialised memory -- Reading/writing memory after it has been free'd -- Reading/writing off the end of malloc'd blocks -- Reading/writing inappropriate areas on the stack -- Memory leaks -- where pointers to malloc'd blocks are lost forever -- Passing of uninitialised and/or unaddressible memory to system calls -- Mismatched use of malloc/new/new [] vs free/delete/delete [] -- Some abuses of the POSIX Pthreads API +Valgrind is a GPL'd system for debugging and profiling x86-Linux programs. +With the tools that come with Valgrind, you can automatically detect +many memory management and threading bugs, avoiding hours of frustrating +bug-hunting, making your programs more stable. You can also perform +detailed profiling to help speed up your programs. + +The Valgrind distribution includes four tools: two memory error +detectors, a thread error detector, and a cache profiler. Several other +tools have been built with Valgrind. %prep %setup -n @PACKAGE@-@VERSION@