Difference between revisions of "Memory Corruption"
(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...") |
|||
(5 intermediate revisions by the same user not shown) | |||
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 | |
+ | |||
+ | '''{,,ucrtbased.dll}_CrtCheckMemory()''' in watch to ensure the result of function is 1. | ||
+ | |||
+ | Do next step in debug and again call {,,ucrtbased.dll}_CrtCheckMemory() to check the result. | ||
+ | |||
+ | P.s. also '''need load symbols for ucrtbased.dll''' | ||
+ | |||
+ | |||
+ | 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 | ||
− | {,, | + | {,,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. | Tags: memory, corrupt, leak, problem. |
Latest revision as of 07:49, 10 June 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
{,,ucrtbased.dll}_CrtCheckMemory() in watch to ensure the result of function is 1.
Do next step in debug and again call {,,ucrtbased.dll}_CrtCheckMemory() to check the result.
P.s. also need load symbols for ucrtbased.dll
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.