zmq crash issue
Please use this template for reporting suspected bugs or requests for help.
Issue description
we use pub-sub mode in linux-c with a very simple example:
but always crash down, and the issue messages are different when the server is not work. it's issue messages:
error message 1:
error message 2:
error message 3:

Environment
- libzmq version (commit hash if unreleased): 4.3.2
- OS: linux
Minimal test code / Steps to reproduce the issue
`
#include <iostream>
#include "zhelpers.hpp"
#include "timer.h"
using namespace std;
int main()
{
int rst;
void *context =zmq_init(1);
void *publisher=zmq_socket(context,ZMQ_PUB);
assert(publisher);
zmq_bind(publisher,"tcp://*:5555");
while(1)
{
sleep(5);
char msg[2048];
msg[0] = '\0';
strcpy(msg, "hello");
rst=zmq_send (publisher, msg, 6, 0);
}
zmq_close(publisher);
zmq_term(context);
return 1;
}
`
there are two clients and three fliters, and there is one socket of the server, the port is 5555. different data with filter is send though the zmq_send().
What's the actual result? (include assertion message & call stack if applicable)
crash down
What's the expected result?
efficient running
our data is transform from struct variables into char arrays by memcpy(). for example:
struct student
{
char name[25];
char class[10];
int age;
char adress[50];
}
student stu;
memset(&stu, 0, sizeof(stu));
strcpy(stu.name, "alex");
strcpy(stu.class, "senior");
stu.age = 18;
char msg[1024];
msg[0] = '\0';
memcpy(msg, "FP:", 4);
mencpy(msg+4, &stu, sizeof(struct stu));
zmq_send(socket, msg, 1024, 0);
This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions.