Re: [Boost-bugs] [Boost C++ Libraries] #8613: [Windows] boost::asio::ip::tcp::socket::async_write(boost::asio::null_buffers(), ...) WriteHandler gets a boost::system::error_code with a NULL category pointer on success

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8613: [Windows] boost::asio::ip::tcp::socket::async_write(boost::asio::null_buffers(), ...) WriteHandler gets a boost::system::error_code with a NULL category pointer on success
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-24 09:28:20


#8613: [Windows]
boost::asio::ip::tcp::socket::async_write(boost::asio::null_buffers(), ...)
WriteHandler gets a boost::system::error_code with a NULL category pointer
on success
-----------------------------------------------+----------------------------
  Reporter: Segev Finer <segev208@…> | Owner: chris_kohlhoff
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------------------+----------------------------

Comment (by chris_kohlhoff):

 Thank you for taking the time to do a proper analysis. Can you please
 confirm whether the following diff corrects the issue for you:

 {{{
 @ -235,8 +235,7 @@ void
 win_iocp_io_service::post_deferred_completion(win_iocp_operation* op)
    op->ready_ = 1;

    // Enqueue the operation on the I/O completion port.
 - if (!::PostQueuedCompletionStatus(iocp_.handle,
 - 0, overlapped_contains_result, op))
 + if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
    {
      // Out of resources. Put on completed queue instead.
      mutex::scoped_lock lock(dispatch_mutex_);
 @@ -256,8 +255,7 @@ void win_iocp_io_service::post_deferred_completions(
      op->ready_ = 1;

      // Enqueue the operation on the I/O completion port.
 - if (!::PostQueuedCompletionStatus(iocp_.handle,
 - 0, overlapped_contains_result, op))
 + if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
      {
        // Out of resources. Put on completed queue instead.
        mutex::scoped_lock lock(dispatch_mutex_);
 @@ -284,8 +282,7 @@ void
 win_iocp_io_service::on_pending(win_iocp_operation* op)
    if (::InterlockedCompareExchange(&op->ready_, 1, 0) == 1)
    {
      // Enqueue the operation on the I/O completion port.
 - if (!::PostQueuedCompletionStatus(iocp_.handle,
 - 0, overlapped_contains_result, op))
 + if (!::PostQueuedCompletionStatus(iocp_.handle, 0, 0, op))
      {
        // Out of resources. Put on completed queue instead.
        mutex::scoped_lock lock(dispatch_mutex_);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8613#comment:4>
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:13 UTC