> I am having a problem if I call CPPUNIT_ASSERT, I get a heap error with
> a bad pointer being passed to free. If I call CPPUNIT_ASSERT_EQUAL I do
> not have a problem.
In most cases, there is a memory problem in your code before calling
CppUnit, and the CppUnit macros are not in cause.
You may have some memory corruption, which is always present but only
visible when you call CPPUNIT_ASSERT. It may be a buffer overflow, or
the program may call free() several times on the same block.
You may find the source of your problem by using Purify, BoundsChecker
or similar tools.
Good luck.
Vincent.
|