Finding and fixing memory leaks in Wine
There are a number of ways to find memory leaks in Wine code.
- This has the advantage of not needing to modify Wine, but Wine Valgrind is slow, and prone to crashes. Only catches runtime errors.
use a leak detection patch - msi richedit
- Requires Wine to be patched, and some slowdown, but should be much faster than Wine with Valgrind. Needs to be adapted to each dll, and only works for dlls that don't return allocated memory to other code. Only catches runtime errors.
use a static code analysis tool such as smatch
- Seems to have quite a few false positives. Catches errors in rarely used codepathes.
