zeromq / zmqpp

0mq 'highlevel' C++ bindings

Home Page:http://zeromq.github.io/zmqpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stack overflow (segmentation) in loop.remove(raw_fd) in loop/raw_fd handler

pavel-orekhov opened this issue · comments

Test case remove_socket_in_handler was added:

    int pipefd[2];
    BOOST_CHECK_EQUAL(0, pipe(pipefd));
    loop.add(pipefd[0], [&](){
        loop.remove(pipefd[0]);
        return true;
    });
    BOOST_CHECK_EQUAL(4, write(pipefd[1],"haha",4));
    BOOST_CHECK_NO_THROW(loop.start());

It loops at loop.remove(pipefd[0]); at poller.remove() and sigsegvs.

Hi, Pavel! Will you create a pull request to the main repository?

Hi, Alexander!

  1. I'm not sure about implementing the "callback after remove" feature for correct implementation of the "close at onReceive". (see #205)

  2. I don't know how to create commit request for #207 commits only, not for complete chain of commits since #204. Please mail me in Russian privately.

If your need is urgent feel free to ignore my job.