Pointers running free… but no longer
I’m not usually working with C/C++ projects. But I’ve been asigned one, and I found this “exciting” (ahem!) situation where our client was able to cause the product to fail when writting to an invalid address. Of course, I wasn’t.
But I found a couple of interesting resources to help in the task. On one hand, a FAQ about debugging (I was quite surprised when it answered my question, but hey, I’m a newbie after all). On the other, some instructions as how to enable a feature of Windows XP (and some others… but XP is one of the target platforms) which allows stopping a program execution when it does a bad memory access (well, not always, but often enough). The instructions are for something called “Pageheap.exe“, although the real program is called “gflags.exe“.
Oh, by the way… the tools are downloaded from the Microsoft’s “Debugging tools” website.
With these tools at hand, I was a little happier.