Skip to content

Instantly share code, notes, and snippets.

@JohnNilsson
Created June 5, 2011 22:06
Show Gist options
  • Save JohnNilsson/1009481 to your computer and use it in GitHub Desktop.
Save JohnNilsson/1009481 to your computer and use it in GitHub Desktop.
zmq example with weird bahavior
#include <zmq.h>
void recv() //This name overrides something in libzmq causing things to break.
{
//NOOP
}
int main()
{
void* ctx = zmq_init(1);
void* skt = zmq_socket(ctx, ZMQ_REP);
zmq_close(skt);
zmq_term(ctx); //The declaration of recv above causes this line to fail with:
//Assertion failed: nbytes == sizeof (command_t) (mailbox.cpp:245)
//Aborted
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment