Hi.
I get the following error, when running the tests
test/LocalSocketTest.cpp:117: error: Failure in TEST(LocalSocketServer_systemtest, string)
src/CppUTest/TestMemoryAllocator.cpp:37: error:
malloc returned null pointer
terminate called after throwing an instance of 'CppUTestFailedException'
Stack trace (most recent call last) in thread 7947:
This does not happen every time I run the tests - only about one fifth of the testruns fails in this way.
If I look at the stacktrace, then it looks like what is failing me is this function:
void SocketCommunication::newBufferSize(uint64_t size)
{
if (size > totalSize)
{
totalSize = size;
delete[] buffer;
buffer = new char[totalSize];
}
}
As the error is with malloc - I assume that it is new, that is failing me.
What could make malloc fail in this way?
I don't think I am out of memory.
Jakob.