Here's the code:char* ptr = (char*)malloc(0);memset( ptr, 0, 1000 );free(ptr);When free() runs in Debug configuration I get a CRT debug error message about heap corruption. When I inspect the call stack I find myself inside crtmbox.c with this function:#ifdef _UNICODEint __cdecl __crtMessageBoxW(#else /* _UNICODE */int __cdecl __crtMessageBoxA(#endif /* _UNICODE */which has this code:HMODULE hlib=LoadLibrary(_T("USER32.DLL"));the problem is there's no matching FreeLibrary() anywhere. So for each load/unload of Visual C++ runtime the process will potentially increase the load count of user32.dll
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results