Valgrind for Mac OS X. Some assembly required.

Valgrind is a powerful open-source memory debugger. This is a port of Valgrind for Mac OS X.

http://valgrind.org/

http://www.apple.com/macosx/

Caveat programmer

This port is UNSUPPORTED and INCOMPLETE and BUGGY. It may not find bugs in your program, or run your program correctly, or run your program at all.

Requirements

Mac OS X 10.5 Leopard.

An Intel processor (32- or 64-bit).

As much RAM as you can afford.

Download and build

Valgrind's Mac OS X support is now part of Valgrind's main development trunk. Follow their instructions to download and build the latest code.

http://valgrind.org/downloads/repository.html

Run

valgrind [--arch= ] [valgrind-options...] /path/to/program [program-options ...]

Some things that don't work

PowerPC code

Signals

Many system calls

Objective-C garbage collection

--db-attach=yes

Tools other than memcheck

Errors in system libraries

Some system libraries have false positives or legitimate errors. Valgrind has a "suppression file" mechanism to ignore specified errors. This port does not include any suppressions, so you'll have to discover them on your own. Please do not file bug reports against system libraries on Valgrind evidence alone.

Messages you may see while running

If you see messages like the following, then your program is using a system call that Valgrind doesn't support. Your program may run incorrectly after this.

UNKNOWN syscall UNKNOWN mach message descriptor UNKNOWN host message UNKNOWN task message UNKNOWN thread message UNKNOWN fcntl UNKNOWN ioctl

UNKNOWN __disable_threadsignal is unsupported UNKNOWN sigaction is unsupported UNKNOWN Mach port modified

sync check at ...: FAILED

Greg Parker

gparker@apple.com

Sealie Software