Skip to content
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

When the topic length of sub exceeds 15kb, xpub crashes when calling zmq_msg_recv. #4671

Open
devsuncj opened this issue Mar 26, 2024 · 0 comments

Comments

@devsuncj
Copy link

Please use this template for reporting suspected bugs or requests for help.

Issue description

I am using clrzmq4 to call libzmq. When the topic length of sub exceeds 15kb, xpub crashes when calling zmq_msg_recv.

Environment

  • libzmq version (commit hash if unreleased): 4.3.5
  • OS: Windows

Minimal test code / Steps to reproduce the issue

var xpub = new ZSocket(ZSocketType.XPUB);
xpub.Bind("tcp://*:6666");
Task.Run(() => {
var msg = xpub.ReceiveMessage(); //Calling this code will result in a crash. When the topic length of sub exceeds 15kb
});
var subSocket = new ZSocket(ZSocketType.SUB);
subSocket.Connect("tcp://localhost:6666");
byte[] dataArray = new byte[1024 * 16];
for (int i = 0; i < dataArray.Length; i++)
{
dataArray[i] = 111;
}
subSocket.Subscribe(dataArray);

What's the actual result? (include assertion message & call stack if applicable)

When the topic length of sub exceeds 15kb, xpub crashes when calling zmq_msg_recv.

What's the expected result?

The expected result is the normal completion of subscribing to data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant