Memory debuggers

Well, I've given up on finding my memory corruption error buried somewhere in my 16k LOC, What memory debuggers for Linux (x86 and x86-64) would you recommend?

While we're on the subject: some code compiled with GCC for Linux x86-64 produces a segmentation fault, but the same code compiled with MinGW doesn't. Does this suggest an error with pointers to the stack, to the heap, or is irrelevant?
It maybe a 64bit incompatibility with your code?
Have you tried GDB?
Unlikely. I wrote it thinking it would be running on both 32- and 64-bit systems.

No, memory debuggers. The kind that detects buffer overflows, memory leaks, and that sort of stuff. E.g. Valgrind.
Only one I use is a Windows based one called AQTime. But it has quite a hefty price tag on it. But you can't beat it.
closed account (z05DSL3A)
I have heard good things about DUMA and Electric Fence but I have not used them.
(and they may not be what you are looking for).

DUMA: http://sourceforge.net/projects/duma
Electric Fence:http://perens.com/works/software/
Well, I ended up using Valgrind, and it's pretty good. I fixed like five minor bugs (when I say "minor", I mean reading past the end of an array by just a few bytes and uninitialized variables) which were causing some not-so-minor errors, in an hour or so.
I think I finally fixed my bug. I've never in my life seen a switch with an uninitialized variable wreak so much havok.

If I have to complain about something about Valgrind is its speed. Programs run much slower. In the order of 10-20 times. It's a good thing it works on optimized code, though. You'll want to save every possible ms with this debugger.
Topic archived. No new replies allowed.