|
From: Nicholas N. <n.n...@gm...> - 2009-05-07 00:23:56
|
On Thu, May 7, 2009 at 6:38 AM, Philippe Waroquiers
<phi...@sk...> wrote:
> The default value for leak-resolution is set to low.
> The default value for the nr of callers in a stack trace is 12 (so significantly higher than the 2 entries corresponding
> to the medium leak resolution).
> When a leak is reported, it is reported with a full stack trace (e.g. 12 callers)
> but this report "merges" the leaks created by various other stack traces only having the first 2 callers
> in common.
>
> At work, this has created confusion (and some doubts about the tool behaviour/quality)
> e.g. because "this stack trace is only called once and allocates only one block, how can it leak that much blocks ?"
> or "I fixed the only leak(s) reported, and now I have other leaks being reported in other stack traces."
>
> It looks to me that leak-resolution=high will be a better default as it will not confuse users.
> If a user really needs to combine various stack traces in one stack trace, then resolution low or medium
> can then be given.
I agree with this. The rationale in the docs is:
<para>For hardcore leak debugging, you probably want to use
<option>--leak-resolution=high</option> together with
<option>--num-callers=40</option> or some such large number. Note
however that this can give an overwhelming amount of information,
which is why the defaults give less information.</para>
but I can see it would be confusing, especially since it is *different
to the way other reports are merged*.
If a user gets lots of leak reports with --leak-resolution=high, then
that's because the program has lots of leaks which will need to be
fixed! Pretending otherwise doesn't make their lives easier. Julian?
> NB: I believe the valgrind user manual description of leak-resolution wrongly says the default value for
> the nr of callers is 4 (I think it is 12).
This was fixed on the trunk, but not the 3.4.X branch. I've fixed it
there too, now.
Nick
|