From: Crispin F. <cr...@th...> - 2003-05-14 13:08:22
|
On Wed, 2003-05-14 at 13:49, Richard Boulton wrote: > Wouldn't that result in confusing, or at least excessively repetitive, > output when the same leak is happening multiple times when called from > different places? Hmm I hadn't thought of that :) > How about changing the leak checker to compare the names up to the first > name in the stack trace that isn't in part of valgrind? This would > exclude the allocation functions quite neatly, which seems desirable. > Perhaps there are problems with this that I can't see, though. That seems like a pretty good solution, the slight problem however is that things such as strdup() aren't provided by valgrind, but will cause a malloc() to be performed, but the actual location of the leak is in the function above. (there may only be a small number of functions like that and these could possibly be special cased to go up another level). Crispin |