Unexpected "Deallocating non-allocated memory"

182 views
Skip to first unread message

Andreï Fomitchev

unread,
Jun 9, 2021, 9:44:26 AM6/9/21
to cpputest
Hi,
I am new in CppUTest so I am starting a little project and I met a very strange message because there is no explicit memory allocation / deallocation in my code:

utest_toDriver.cpp:36: error: Failure in TEST(ToDriver, SendingReception)
SendingReception:36: error:
    Deallocating non-allocated memory
   allocated at file: <unknown> line: 0 size: 0 type: unknown
   deallocated at file: <unknown> line: 0 type: delete

where line 36 is just
TEST(ToDriver, SendingReception)

I ran valgrind on produced bin (using provided valgrind.suppressions file from source) and where are 52 errors (mismatch free/delete/delete[], invalid read of..., etc.). I use a Debian 10 and installed CppUTest version is 3.8-7
I am little "disappointed" than a testing framework met a blocking issue.
What I should do to avoid the issue? Should I change CppUTest version (rebuild from source?) Etc.
Best regards

Andreï Fomitchev

unread,
Jun 11, 2021, 9:21:05 AM6/11/21
to cpputest
Hi,

I identified a moving on std::string but the original string has been still used. I fixed the point and the my issue gone. CppUTest error is useless in my case.

Best regards,
Reply all
Reply to author
Forward
0 new messages