|
Boost Users : |
Subject: Re: [Boost-users] [Boost.Test] valgrind complains about invalid reads
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-11-21 19:45:50
Peter Klotz <peter.klotz <at> aon.at> writes:
> Here the test_unit pointer is not correct and does not match the one
> initially registered!
So what? Id match, right? test_unit* is shifted by 4 bytes from test_suite* (it
does have virtual destructor).
In fact I do not see a reason, why test_suite need virtual destructor. Maybe if
I remove it, valgrind will be happy? Though I still believe code is valid as is.
> I agree that deregister_test_unit() does not delete the test_suite but
> the pointers ought to match.
No they should not.
> Maybe you can run my simple test case using valgrind. I used version
> 3.3.1 under Ubuntu 8.10 i386 (gcc 4.3.2) and Red Hat Enterprise Linux 5
> x86_64 (gcc 4.1.2).
I do not have valgrind easily accessible at home.
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