Loading ...
Sorry, an error occurred while loading the content.
 

Re: Hi. About poller ..

Expand Messages
  • Dan Kegel
    Hi Jeon! Thanks so much for the bugfix! - Dan
    Message 1 of 1 , May 15, 2002
      Hi Jeon! Thanks so much for the bugfix!
      - Dan

      ÀüÂù¼® wrote:
      >
      >
      > Hi. My name is Jeon.
      >
      > First of all, thank you abut the Poller product.
      > I adopted the Poller of dkftpbench to my project for better performance.
      >
      > While I and my coworker do our project,
      > we have found something wrong.
      >
      > When we look up the source code,
      > we realized that there is no checking the invalid m_clients[fd] in '
      > Poller_select::getNextEvent(Poller::PollEvent *e) '.
      >
      > Like other Poller( eg. Poller_devpoll ) , I think, need to check the null.
      > The rare core dump occured because of deleting the other poller child.
      >
      > 253 // Find the next fd with bits set
      > 254 for (revents=0; m_cur_fd++ < m_max_fd; ) {
      > 255 // Avoiding branches inside this loop only improves
      > benchmark by 2%,
      > 256 // so don't bother.
      > 257
      > 258 // ¸ñ 5¿ù 16 11:34:58 KST 2002
      > 259 // Patched bug.
      > 260 if ( m_clients[m_cur_fd] == NULL ) continue;
      > 261
      > 262 if (FD_ISSET(m_cur_fd, &m_testrfds)) revents = POLLIN;
      > 263 if (FD_ISSET(m_cur_fd, &m_testwfds)) revents |= POLLOUT;
      > 264 #ifdef Poller_URGENT
      > 265 if (FD_ISSET(m_cur_fd, &m_testefds)) revents |= POLLPRI;
      > 266 #endif
      > 267 if (revents)
      > 268 break;
      > 269 }
      >
      > Sincerely.
    Your message has been successfully submitted and would be delivered to recipients shortly.