Difference between revisions of "Memory Corruption"
Line 7: | Line 7: | ||
Then in each function put _CrtCheckMemory(); before and after functions that can lead to problem | Then in each function put _CrtCheckMemory(); before and after functions that can lead to problem | ||
− | + | For the memory corruption finding: find a place where the possible problem can appear. Call | |
+ | |||
+ | {,,msvcrt.dll}_CrtCheckMemory() in watch to ensure the result of function is 1. | ||
+ | |||
+ | Do next step in debug and again call {,,msvcrt.dll}_CrtCheckMemory() to check the result. | ||
+ | |||
+ | Old: | ||
For the memory corruption finding: find a place where the possible problem can appear. Call | For the memory corruption finding: find a place where the possible problem can appear. Call | ||
Line 14: | Line 20: | ||
Do next step in debug and again call {,,msvcr120d.dll}_CrtCheckMemory() to check the result. | Do next step in debug and again call {,,msvcr120d.dll}_CrtCheckMemory() to check the result. | ||
+ | |||
Tags: memory, corrupt, leak, problem. | Tags: memory, corrupt, leak, problem. |
Revision as of 10:35, 18 May 2022
In the stack find first place the problem can appear and put:
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_CHECK_ALWAYS_DF );
_CrtCheckMemory();
Then in each function put _CrtCheckMemory(); before and after functions that can lead to problem
For the memory corruption finding: find a place where the possible problem can appear. Call
{,,msvcrt.dll}_CrtCheckMemory() in watch to ensure the result of function is 1.
Do next step in debug and again call {,,msvcrt.dll}_CrtCheckMemory() to check the result.
Old:
For the memory corruption finding: find a place where the possible problem can appear. Call
{,,msvcr120d.dll}_CrtCheckMemory() in watch to ensure the result of function is 1.
Do next step in debug and again call {,,msvcr120d.dll}_CrtCheckMemory() to check the result.
Tags: memory, corrupt, leak, problem.