[zeromq-dev] nmap patch for github issues 147+149 (nmap)

Pieter Hintjens ph at imatix.com
Mon Jan 17 10:19:03 CET 2011

Hi Thijs,

This is really great, thanks! Could you read the page at
http://www.zeromq.org/docs:contributing and resubmit the patch as a
signed-off patch following those instructions?


On Mon, Jan 17, 2011 at 10:04 AM, Thijs Terlouw <thijsterlouw at gmail.com> wrote:
> Hi Martin,
> This patch solves the crashes I was seeing when I ran nmap against a
> range of listening ZeroMQ sockets (github issues 147 + 149)
> I'm not sure if I patched it correctly (for example the want_terminate
> boolean in zmq_engine_t is a bit of a hack), but at least this works
> for me and in the worst case it can give you some ideas how to solve
> it correctly.
> There were two seperate issues:
> 1. zmq_engine_t::error() assumed it was plugged in
>  - it's appears to be valid to be in an unplugged state and call the
> error() function in the in_event() function
> 2. zmq_engine_t::error() deleted itself which let to dangling pointer
> and virtual function call in session_t
>  - zmq_init_t dispatches the ephemeral engine
>  - zmq_init_t send_attach()
>  - ephemeral engine encounters an error, deletes itself
>  - session_t process_attach tries to plug the (already destructed)
> engine back in
> if you want to use the patch, it's supplied under LGPL :)
> Thijs
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list