14 Nov
2008
14 Nov
'08
10:11 p.m.
James Sutherland wrote:
Try compiling a debug version. That will give you line numbers to help you track it down easier. James
Found the problem. It was a non virtual destructor in class test_unit. Since test_unit is the base class of test_case, test_suite and master_test_suite_t it needs a virtual destructor. In deregister_test_unit() a test_unit* pointer is passed which may actually point to a derived class. Calling delete without a virtual destructor leads to undefined behavior (and makes valgrind complain). The attached patch against 1.37.0 fixes this problem. Regards, Peter.