nanomsgxx
nanomsgxx copied to clipboard
Test #1: message ***Failed
Hello. After build and run:
ctest -C Debug .
first test is fails, other tests is ok.
message.cpp: ... message::~message() { if (m_data != nullptr) { #ifdef NDEBUG nn_freemsg(m_data); #else if (nn_freemsg(m_data) != 0) { // !!! THIS Fails !!! std::fprintf(stderr, "warning: nn_freemsg: %s\n", strerror()); } #endif } } ...
Build and compile with VS 2017 with last updates. Using stable 'nanomsg', version v1.1.5
Macro variable NDEBUG=1
was not defined in CMakeLists. Further, there was a buffer overflow due to std::strcpy
appending a trailing \0
character. Does PR #21 solve this problem?