One of my C++ applications crashed and I got a minidump. The application was compiled in release with all sorts of optimizations. The "Characteristics" value when I execute !lmi in WinDbg is 2022 (I don't know what this means, sorry). The minidump shows that the piece of code which threw the unhandled exception was something like this:
size_t idx = GetValue();
someOtherVar = someVector[idx];
I am sure that someVector has at least one element and analyzing the minidump with winDbg it says that the value of the local variable idx is 0x0. In addition, the execution of dv /V in winDbg says that idx is stored in @r10.
I can find an explanation for this crash for values of idx > 0, but not if idx == 0. Is it possible that variable idx had been optimized and the real value used to access someVector were greater than 0?