Heap corruption: What could the cause be?

后端 未结 13 1550
时光取名叫无心
时光取名叫无心 2020-12-25 12:56

I am investigating a crash due to heap corruption. As this issue is non-trivial and involves analyzing the stack and dump results, I have decided to do a code review of file

13条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-25 13:28

    During freeing heap memory, first child memory block need to be deleted and then parant memory block otherwise the child momory block would be leaked parmanently which causes the crash after running the tool millions of times.. ex:

    constQ= new double* [num_equations];
    for(int i=0;i

提交回复
热议问题