Difference between revisions of "Memory Corruption"

From MPSWiki
Jump to: navigation, search
(Created page with "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(); T...")
 
Line 11: Line 11:
 
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
  
{,,msvcr90d.dll}_CrtCheckMemory() in watch to ensure the result of function is 1.
+
{,,msvcr120d.dll}_CrtCheckMemory() in watch to ensure the result of function is 1.
  
Do next step in debug and again call {,,msvcr90d.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 07:32, 12 March 2020

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

{,,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.