Valgrind is a tool that helps you find memory management problems in 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 uninitialized memory, reading/writing of memory after it has been freed, reading/writing off the end of malloced blocks, reading/writing inappropriate areas on the stack, memory leaks in which pointers to malloced blocks are lost forever, passing of uninitialized and/or unaddressable memory to system calls, and mismatched use of malloc/new/new [] vs. free/delete/delete [].
| Tags | Software Development Testing |
|---|---|
| Licenses | GPL |
| Operating Systems | POSIX Linux |
| Implementation | C++ |
Recent releases


Changes: This release fixes some regressions and assertion failures in debug info reading in 3.4.0, most notably incorrect stack traces on amd64-linux on older (glibc-2.3 based) systems. Various other debug info problems are also fixed. A number of bugs in the exp-ptrcheck tool introduced in 3.4.0 have been fixed. In view of the fact that 3.4.0 contains user-visible regressions relative to 3.3.x, upgrading to 3.4.1 is recommended. Packagers are encouraged to ship 3.4.1 in preference to 3.4.0.


Changes: This release fixes bugs in 3.3.0, adds support for glibc-2.8 based systems (openSUSE 11, Fedora Core 9), improves the existing glibc-2.7 support, and adds support for the SSSE3 (Core 2) instruction set.


Changes: Helgrind works again with improved race detection and better error messages. Massif generates better output. Cachegrind has been extended to do branch-misprediction profiling. Both conditional and indirect branches are profiled. Scalability has been improved for very large programs, particularly those with a million or more malloc'd blocks in use at once. These improvements mostly affect Memcheck, which is also up to 10% faster for all programs, with x86 Linux seeing the largest improvement. The documentation has been reorganized. Experimental tools have been added. There are many other changes.


Changes: This release fixes a regression introduced in 3.2.2 that could cause an assertion failure when running obscure pieces of SSE code. It adds one more glibc 2.5 intercept. It is otherwise identical to 3.2.2. Please do not use (or package) 3.2.2.


Changes: PPC64/Linux support has been added. Lackey has been improved. SSE3 support for AMD/Intel has been added. MPI support has been added. Numerous code speedups and bugfixes were made.
- All comments
Recent commentsJust Awesome
There's just no other way to describe it.
This program is an absolute must for any C/C++ developer. My compliments to the developers, you've really done an outstanding job.
And thanks for saving me from a long day of bug tracking.
I like it a lot. Any plans for stack variable checking?
I like this tool a lot!
Are there any plans for checking stack variables?
For example:
int arr[10];
arr[11] = ...;
David
valgrind is my new favorite toy!
We love valgrind at Addamark, and have already
spread the religion throughout our development
process. It's *way better* than Purify ever was,
(a) fewer false-positives and (b) easier to run,
i.e. don't have to 'purify' the executable.
Julian,Nick-- hats off!! and btw I love the ideas
behind the nextgen architecture.
great tool!
Valgrind is an excellent memory debugging tool. I
have used it effectively to squish a memory leak
where many others had failed. Excellent work,
developers! This software is a godsend to any
programmer.
Excellent tool
Wow, at last we have an efficient memory leak debugger on Linux/i386! Thanks for this tool, which is the only way to cleanup complex code, detect leaks/buffer overflows and unitialized areas.
For information, similar tools (like purify) are rare, and generally costs thousands of dollars.