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

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

Open
pavel-orekhov opened this issue Jan 31, 2018 · 2 comments

Comments

@pavel-orekhov
Copy link

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.

pavel-orekhov pushed a commit to pavel-orekhov/zmqpp that referenced this issue Jan 31, 2018
pavel-orekhov pushed a commit to pavel-orekhov/zmqpp that referenced this issue Jan 31, 2018
pavel-orekhov pushed a commit to pavel-orekhov/zmqpp that referenced this issue Jan 31, 2018
@alexanderlobov
Copy link
Contributor

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

@pavel-orekhov
Copy link
Author

Hi, Alexander!

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

  2. I don't know how to create commit request for stack overflow (segmentation) in loop.remove(raw_fd) in loop/raw_fd handler #207 commits only, not for complete chain of commits since Valgrind disagree with pop_front() on received zmqpp::message #204. Please mail me in Russian privately.

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

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

2 participants