I spent the last week working on the GDI leak detection tool. We also conduct regular stress testing, and it never lasted longer than a day without stopping due to excessive consumption of the / gdi object descriptor.
My attempts have been quite successful, as far as I can tell. Of course, I spent some time in advance looking for an alternative and faster solution. It is worth mentioning that I had some previous semi-successful experience with the GDILeaks tool from the msdn article mentioned above. Not to mention the fact that I had to solve several problems before starting work, and this time it just did not give me what and how I wanted it. The disadvantage of their approach is the super-heavy debugger interface (it slows down the target under study by orders of magnitude, which I consider unacceptable). Another drawback is that it did not work all the time - on some runs, I just could not get it to inform / calculate anything! Its complexity (judging by the amount of code) was another deterrent factor. I am not a big fan of the GUI since I am convinced that I am more productive without windows at all; o). It was also difficult for me to find and use my characters.
Another tool that I used before writing myself was testbrowser .
In any case, I finally decided to use an iterative approach to achieve the following goals:
- minor penalties
- ease of implementation
- non-invasiveness (used for several products)
- relying on the maximum possible
I used a bypass (non-commercial use) for the main functionality (this is an injection DLL). Put Javascript to automatically generate the code (15K script into 100K source code) - in no way do I manually code this and use the C preprocessor!) Plus the windbg extension for data analysis and support for snapshots / differences.
Tell a short story - after I finished, gather information in a few hours during another stress test and another hour to analyze and fix leaks.
I will be glad to share my conclusions.
PS I spent some time trying to improve the previous work. My intention was to minimize false positives (I saw almost too many who are developing), so he will also check the consistency of distribution / output, and also avoid accounting for emissions that never leak.
Edit: Find tool here
deemok
source share