
Gennadiy Rozental wrote:
Rush Manbert
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