How to write a sample code that will crash and produce dump file?

后端 未结 9 1430
礼貌的吻别
礼貌的吻别 2020-12-12 23:15

I started learned windbg and I found this good post How to use WinDbg to analyze the crash dump for VC++ application?

Now I want to follow the instructions and do it

9条回答
  •  心在旅途
    2020-12-12 23:30

    Try this:

    int main()
    {
       int v[5];
    
       printf("%d", v[10]);
       return 0;
    }
    

    or access a random memory location.

提交回复
热议问题