LWN.net Logo

Valgrind memory debugger 1.0.0

Developer Julian Seward has released version 1.0.0 of the Valgrind memory debugger for x86-GNU/Linux with the following inspirational note:

Programmers! Make your software Valgrind-clean. Test it with Valgrind and fix all problems Valgrind reports. This will give you some assurance that your code is free of a broad class of memory management errors. You may well find undiscovered bugs, and your code will probably be more stable as a result. It's good for your code, good for you and especially it's good for the people who use your code.

By intercepting a number of memory related system calls, Valgrind can detect the following problems:

  • The use of uninitialised memory.
  • Reading and writing of freed memory after it has been free'd
  • Reading and writing past the end of malloced memory.
  • Reading and writing of inappropriate areas on the stack.
  • Memory leaks involving lost pointers to malloced blocks.
  • The passing of uninitialized and/or unaddressible memory to system calls.
  • The mismatched use of malloc/new/new and free/delete/delete.
  • Some possible misuses of the POSIX pthreads API.

Valgrind is supposed to be able to check any dynamically-linked ELF x86 executable, without modification or recompilation, and it can fire up GDB when errors are encountered. Valgrind also has built-in cache profiling, which can be useful for enhancing the performance of code.

The current 1.0.0 release has undergone a feature-freeze testing phase and it is considered to be stable code at this point. It has successfully been used to check a number of large applications such as KDE3, Mozilla, OpenOffice, and MySQL, to name a few applications. See the Valgrind user manual for the full documentation. Valgrind has been released under the GPL license.


(Log in to post comments)

Try it!

Posted Aug 1, 2002 9:17 UTC (Thu) by eru (subscriber, #2753) [Link]

I have used the pre-1.0.0 versions of Valgrind, and found them
quite useful and impressively stable for beta software. Seward is clearly
one of the rare programmers who puts a very high priority on quality, and Valgrind
is a tool that helps others aim for the same. I have tried many other
memory testers, both commercial and noncommercial, but Valgrind has
some unique capabilities that none of the competition have.
If you program in C or C++ on Linux/x86, do yourself and especially
your users a favour, and start using Valgrind today!

Use Eiffel

Posted Aug 1, 2002 18:24 UTC (Thu) by gorg_H (guest, #158) [Link]

Eiffel is designed to write applications without worry about garbage or pointers, and it's object-oriented. So, if you use Eiffel, you don't need this program.

links:

smalleiffel.loria.fr (SmallEiffel) -- this is GNU
www.eiffel.com (ISE Eiffel) -- propietary, but powerful IDE

Use Eiffel

Posted Aug 1, 2002 18:53 UTC (Thu) by scripter (subscriber, #2654) [Link]

Was that a troll? If I use Java, Perl, Ruby, Python or shell script, I don't need Valgrind either. So what?

Valgrind is an outstanding tool, and very worthy of mention since many projects need a good memory debugger.

Copyright © 2002, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds