[vtk-developers] Debug leaks, dashboards and local behavior

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Feb 13 12:58:34 EST 2012


On Mon, Feb 13, 2012 at 12:03 PM, Brad King <brad.king at kitware.com> wrote:
> On 2/13/2012 11:46 AM, Marcus D. Hanwell wrote:
>>
>> I would like to change the default behavior of debug leaks. Currently
>> when you turn it on, if you run tests locally and there are leaks a
>> test will pass. You will only spot the failure if you run the tests
>> with -V and scan the output. See,
>
> [snip]
>
>> Does anyone remember the reason for doing this, it seems to go back
>> quite a way as it also looks for DART_TEST_FROM_DART.
>
>
> Some history:
>
>  http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=e771181e
>  http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=f2d576b8
>  http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=d70bff5a
>
> I don't remember why it was decided not to enable it locally by default.
> One hypothesis is that the feature calls exit(1) which is not so nice
> for library code to do to applications.  However, since it is only
> enabled by an explicit build option meant for debugging I see no real
> reason not to do this by default.  An application can always set the
> ExitError flag explicitly to choose its own behavior.
>
I think because you explicitly turn on debug leaks in addition to
setting the build type then it is reasonable to call exit, although as
you say not ideal. An application developer shouldn't really be
turning on debug leaks, and as far as I can tell this would be called
during the exit of a process causing an early exit (rather than
exiting as an application runs).

Marcus



More information about the vtk-developers mailing list