Recently I have been debugging some memory corruption that happened only after something executed 64 times,
free complained that memory has been corrupted.
Thus started the usual process of debugging. I started
ApplicationVerifier and set the application and enabled the basic checks.
Soon my application started failing with access violation during startup, this happened even before I reached the code where memory was corrupted. Now I have two problems to investigate.
This time I was crashing with call to
WideCharToMultiByte. Started debugging to see exactly where it was failing:
ntdll.dll!RtlUnicodeToUTF8N() Unknown KernelBase.dll!WideCharToMultiByte() Unknown vfbasics.dll!000007fef081cd0c() Unknown > heapcorruption.exe!dllNotificationFunction(unsigned long NotificationReason, const _LDR_DLL_NOTIFICATION_DATA * NotificationData, void * Context) Line 64 C++ ntdll.dll!string "Enabling heap debug options\n"() Unknown ntdll.dll!LdrpFindOrMapDll() Unknown ntdll.dll!LdrpLoadDll() Unknown ntdll.dll!LdrLoadDll() Unknown vfbasics.dll!000007fef08074de() Unknown KernelBase.dll!LoadLibraryExW() Unknown heapcorruption.exe!main() Line 94 C++ heapcorruption.exe!invoke_main() Line 75 C++