Visual Studio - how to find source of heap corruption errors

前端 未结 8 1949
失恋的感觉
失恋的感觉 2020-12-02 05:32

I wonder if there is a good way to find the source code that causes a heap corruption error, given the memory address of the data that was written \'outside\' the allocated

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 05:59

    Maybe you can try Microsoft's Application Verifier. It solved a similar problem for me once,by turning on extra checks on heap operations. In my opinion, the randomness of corrupted address is because the heap can be 'subtly' damaged, and the problem won't show up until something big happens to the heap (like massive allocation/free).

提交回复
热议问题