Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test] valgrind complains about invalid reads
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-12-19 02:23:39


Peter Klotz wrote:
> Gennadiy Rozental wrote:
>> Peter Klotz <peter.klotz <at> aon.at> writes:
>>
>>> Why not just adding the virtual destructor to make valgrind happy?
>>
>> Did you try removing virtual from test_suite destructor instead?
>>
>
> Yes, just making ~test_suite() non virtual worsens things.
>
> valgrind complains about twice as many "invalid read" errors.

[...]

> Making ~test_unit() virtual removes all errors. Then even a non virtual
> ~test_suite() is no longer a problem.
>
> So the final conclusion would be to remove virtual from ~test_suite()
> and add it to the base class destructor ~test_unit().

Peter,

I am not convinced there is a bug inside the Boost.Test code. As far as
I can tell all I am doing is legitimate. Maybe we should report this to
the valgrind developers instead?

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net