Wednesday, April 4, 2007


The other day I had severe problems locating a bug in a program I'm working with currently. It seemed obvious that it was some sort of memory error because of it's randomness. When I was stepping the code in the debugger sometimes everything worked alright and the next time it segfaulted. And sometimes it worked for a couple of runs and sometimes it crashed immediately. So I installed HeapAgent and found the problem in something like 10 seconds. It was a memory allocation that I thought was global but a 3rd party library deallocated the memory when called!

No comments: