Tux-UKUUG logo
UKUUG Linux Developers' Conference
Linux 2002
---------------------------------------------------
4 - 7 July 2002
Bristol

Julian Seward - bzip2 and Valgrind author

Valgrind: An Open-Source Memory Debugger for x86-linux

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 [].

Valgrind tracks each byte of memory in the original program with nine status bits, one of which tracks addressibility of that byte, while the other eight track the validity of the byte. As a result, it can detect the use of single uninitialised bits, and does not report spurious errors on bitfield operations.

You can use it to debug more-or-less any dynamically-linked ELF Linux x86 executable, without modification, recompilation, or anything. It works by translating x86 code to instrumented x86 code, on the fly.

I'll talk about Valgrind's implementation, possible extensions, and feedback from users.


Programme Timetable Dinner Call for Papers
Location Accommodation Booking Form Exhibition


S  P O N S O R S
IBM
IBM developerWorks
Sony PlayStation 2
Sony PlayStation 2
Sistina Software
Sistina Software
  Astaro Network Firewall
Astaro Network Firewall
 
AMD
AMD
Perforce
Perforce
Borland
Borland

M  E D I A   S  P O N S O R S
OSDN
OSDN
Linux Magazine
Linux Magazine
Linux User
Linux User
Linux Format
Linux Format
Need To Know
NTK

For more information please contact UKUUG Problems? e-mail webmaster
© Copyright 2002 UKUUG Ltd