-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valgrind disagree with pop_front() on received zmqpp::message #204
Comments
* add message::operator<< for message (AKA append) and for frame * tests for new methods * fix indent
I found a sentence:
Queue to check it with pop_front() |
The problem here is a bug in the move assignment operator of the frame class.
The call to Btw, the reason why valgrind is complaining about message::pop_front() is that this method erases the first element of the message from a |
The zmq_msg_init() at the beginning created a new message overwriting the handle of the old message. But this old message was not closed leaving a memory leak behind. Instead of closing the existing handle explicitly we can simply remove the init call because zmq_msg_move() does the closing of the old message on its own. see zeromq#204
When I call pop_front() on message after sock.receive() valgrind starts to worry.
I use 4.2.0+ version at intel64 (ubuntu 17.10)
Please confirm the bug.
A sample is here:
popfront.cpp.txt
The text was updated successfully, but these errors were encountered: