Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] Malloc exceptions when using test framework on 64bit OS X 10.6.1
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-09-29 00:19:43


Gennadiy Rozental wrote:
> Rush Manbert <rush <at> manbert.com> writes:
>
>> Now I have gone back and read the original thread about valgrind
>> complaints. I see that Gennadiy is rather adamant about not changing
>> the code.
>
> I am not adamant. I just want to understand what is wrong and need some
> time to look deeper. I plan to look into this Friday/Saturday.
>
> Genandiy
>
> P.S. Does anyone have vmware image for the system where I can easily
> reproduce this?

Ok. I was able to get hold of freebsd 64 bit image and reproduce this.

Further investigation uncovered that the issue with statement:

delete (test_case*)tu.second;

is not the non-virtual destructor of class test_unit, but the fact that
compiler decides to evaluate the expression tu.second twice: once before
calling the destructor and once before calling free. By the type the
destructor is called tu is invalid.

Not sure what is so specific about 64 bit, but i believe the issues
should be resolved (by caching the value before delete statement).

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