I am wondering if it is possible to use WinDbg to close a column that will result in descriptor distribution.
For example:
#include <windows.h>
#include <conio.h>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout << "Press ENTER to leak handles." << endl;
_getch();
cout << "Leaking handles" << endl;
for (int i = 0; i < 100; ++i)
{
HANDLE h = CreateEvent(NULL, FALSE, FALSE, NULL);
if (h != NULL)
{
cout << ".";
}
}
cout << "Handles leaked. Press ENTER to exit." << endl;
_getch();
return 0;
}
After creating this sample and running it in WinDbg, you can get the call column that selected the descriptors, in the example above the line:
HANDLE h = CreateEvent(NULL, FALSE, FALSE, NULL);
I lead the team !handle, but so far no progress has been made.
This applies to leak analysis. I know that !htrace -enableand !htrace -diff, but this is a different usage scenario (if there any way of combining or other vector to use it, please provide information).
source
share