Can you run the same code on another machine and have it crash in the same way? |
Yes. Plus, again, if it was simply a memory error the program should not crash in the same place every time. Virtual pages should be getting assigned to physical regions non-deterministically. Not to mention that if memory errors were happening this frequently my computer would just crash constantly.
Tweaking a nibble within a long word seems an awfully specific sequence of events. Something has to do rather more than assignment to make that kind of detailed corruption. |
Not necessarily. I haven't looked into it enough to find exactly how the pointers change values, but in the example in OP the change can be accomplished by setting a whole byte.
Are you able to predict (with some percentage of success) which pointer will be clobbered before it actually happens? |
Sadly, no. And yes, I know about data breakpoints. They're a god-sent when your program behaves deterministically, but otherwise not much help. Reverse debugging would be so sweet, though.
Another very useful tool that I used when debugging my emulator that I'm surprised hasn't been implemented in any debugger/CPU (even though it would likely have a significant performance cost) is the ability to track what instruction pointer last modified the value of an address or register. Of course, that time I was also recording the clock-by-clock states of the IO registers, thus I was removing the non-determinism and doing poor man's reverse debugging.
* Run.
* Detect crash.
* Write down guilty address.
* Set breakpoint.
* Run again.
* Hit breakpoint.
* Write down guilty address.
* Set breakpoint.
* Run again.
Et cetera.