Solving random crashes

前端 未结 17 1166
青春惊慌失措
青春惊慌失措 2021-01-31 08:15

I am getting random crashes on my C++ application, it may not crash for a month, and then crash 10 times in a hour, and sometimes it may crash on launch, while sometimes it may

17条回答
  •  無奈伤痛
    2021-01-31 08:59

    You've already heard how to handle this under linux: inspect core dumps and run your code under valgrind. So your first step could be to find the errors under Linux and then check if they vanish under mingw. Since nobody did mention mudflap here, I'll be doing it: Use mudflap if your Linux distribution supplies it. mudflap helps you to catch pointer misuse and buffer overflows by tracking the information where a pointer is actually allowed to point to:

    • http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging

    And for Windows: There is a JIT debugger for mingw, called DrMingw:

    • http://code.google.com/p/jrfonseca/wiki/DrMingw

提交回复
热议问题