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?
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.