Re: [Boost-bugs] [Boost C++ Libraries] #8967: Spurious zero bytes written and eof notifications highlight ASIO IOCP issues

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8967: Spurious zero bytes written and eof notifications highlight ASIO IOCP issues
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-06 08:47:04


#8967: Spurious zero bytes written and eof notifications highlight ASIO IOCP
issues
-------------------------+-------------------------------------------------
  Reporter: | Owner: chris_kohlhoff
  simoncperkins@… | Status: closed
      Type: Bugs | Component: asio
 Milestone: To Be | Severity: Problem
  Determined | Keywords: eof GetQueuedCompletionStatus
   Version: Boost | WSARecv WSASend overlapped
  1.54.0 |
Resolution: invalid |
-------------------------+-------------------------------------------------

Comment (by simoncperkins@…):

 Chris,

 When you had the access violations were you using non-null
 lpNumberOfBytesRecvd / lpNumberOfBytesSent parameter values for
 WSARecv/WSASend like the current Boost ASIO implementation?

 The MSDN docs for both functions clearly state that these parameters
 should be NULL for overlapped I/O:
 ''
 "Use NULL for this parameter if the lpOverlapped parameter is not NULL to
 avoid potentially erroneous results. This parameter can be NULL only if
 the lpOverlapped parameter is not NULL."''

 Perhaps, the APIs attempt to access the overlapped structure after
 completion using GetOverlappedResult to extract the bytes read/written
 value and that's what causes the access violation.

 We've been running with my diffed code on Windows 7 and 8 for nine months
 now both in release and debug with no access violations. However, the code
 does use NULL for the lpNumberOfBytesRecvd / lpNumberOfBytesSent
 parameters.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8967#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC