Closed agladysh closed 13 years ago
Note that the crash happens in the term().
Here is another one:
$ lua -l zmq -e 'print("V:", unpack(zmq.version())) ctx=zmq.init(2) c=assert(ctx:socket(zmq.SUB)) print("E:", c:bind("epgm://eth0;172.16.150.255:5555")) print("closing") c:close() print("term") ctx:term() print("done")' V: 2 1 4 E: true nil closing term Assertion failed: rc == 0 (connect_session.cpp:96) Aborted
But also on recv():
$ luajit2 -l zmq -e 'print("V:", unpack(zmq.version())) ctx=zmq.init(2) c=assert(ctx:socket(zmq.SUB)) print("E:", c:bind("epgm://eth0;172.16.150.255:5555")) print("recv") c:recv() print("closing") c:close() print("term") ctx:term() print("done")' V: 2 1 4 E: true nil recv Assertion failed: rc == 0 (connect_session.cpp:96) Aborted
(Note that I know that the socket URLs are incorrect. My point is that lua-zmq should not crash with assertion, but should report error.)
This is an issue with ZeroMQ. Please report it to the ZeroMQ project.
This is likely to be a ZMQ problem, but it still sucks to get a crash on bad user input, so maybe you can report it upstream?
Actually I think that I was able to get this error in some other cases, without
pgm://
— where user input may be sanitized. I will get back to you if I will be able to find that case.