|
From: <sv...@va...> - 2006-03-31 12:24:44
|
Author: njn Date: 2006-03-31 13:24:37 +0100 (Fri, 31 Mar 2006) New Revision: 5804 Log: update Memcheck description Modified: trunk/README Modified: trunk/README =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/README 2006-03-31 12:05:04 UTC (rev 5803) +++ trunk/README 2006-03-31 12:24:37 UTC (rev 5804) @@ -21,24 +21,27 @@ also perform detailed profiling, to speed up and reduce memory use of yo= ur programs. =20 -The Valgrind distribution currently includes five tools: two memory erro= r -detectors, a thread error detector, a cache profiler and a heap profiler= . +The Valgrind distribution currently includes four tools: a memory error +detector, a thread error detector, a cache profiler and a heap profiler. =20 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: +under the supervision of Memcheck, the memory error detector tool, all +reads and writes of memory are checked, and calls to malloc/new/free/del= ete +are intercepted. As a result, Memcheck can detect if your program: =20 - 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 [] - Overlaps of arguments to strcpy() and related functions - Some abuses of the POSIX pthread API + - Accesses memory it shouldn't (areas not yet allocated, areas that h= ave + been freed, areas past the end of heap blocks, inaccessible areas o= f + the stack). =20 + - Uses uninitialised values in dangerous ways. + + - Leaks memory. + + - Does bad frees of heap blocks (double frees, mismatched frees). + + - Passes overlapping source and destination memory blocks to memcpy()= and + related functions. + 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 one of these errors occurs, you can |