From 7488be61c2b955e085659a1616262b0482bfb737 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Thu, 25 Jan 2018 15:59:57 +0100 Subject: [PATCH] Problem: add_fd might be called with fd_ == retired_fd Solution: add assertion --- src/poll.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/poll.cpp b/src/poll.cpp index 1f9163cf..2ba5d84e 100644 --- a/src/poll.cpp +++ b/src/poll.cpp @@ -57,6 +57,8 @@ zmq::poll_t::~poll_t () zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_) { + zmq_assert (fd_ != retired_fd); + // If the file descriptor table is too small expand it. fd_table_t::size_type sz = fd_table.size (); if (sz <= (fd_table_t::size_type) fd_) {