Boost C++ Libraries: Ticket #6310: Buffered write stream broken https://svn.boost.org/trac10/ticket/6310 <p> Buffered write stream does not work at all in 1.47.0 or 1.48.0 (it did work in 1.45.0, I haven't checked 1.46). </p> <p> This should fix it: </p> <pre class="wiki">+++ boost_1_48_0/boost/asio/buffered_write_stream.hpp @@ -335,7 +335,7 @@ std::size_t bytes_avail = boost::asio::buffer_size(buffers); std::size_t length = bytes_avail &lt; space_avail ? bytes_avail : space_avail; storage_.resize(orig_size + length); - return boost::asio::buffer_copy(storage_.data(), buffers, length); + return boost::asio::buffer_copy(storage_.data() + orig_size, buffers, length); } /// The next layer. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6310 Trac 1.4.3 chris_kohlhoff Thu, 12 Jan 2012 07:42:50 GMT <link>https://svn.boost.org/trac10/ticket/6310#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6310#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76426" title="Fix regression in buffered_write_stream. Refs #6310.">[76426]</a>) Fix regression in buffered_write_stream. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6310" title="#6310: Bugs: Buffered write stream broken (closed: fixed)">#6310</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Sun, 15 Jan 2012 13:47:35 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6310#comment:2 https://svn.boost.org/trac10/ticket/6310#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76516" title="Merge from trunk: * Chrono support. * Added object_handle support. ...">[76516]</a>) Merge from trunk: </p> <ul><li>Chrono support. </li></ul><ul><li>Added object_handle support. </li></ul><ul><li>Need to enable the basic_handle class when object_handle is supported. </li></ul><ul><li>Update copyright notices. </li></ul><ul><li>Fix MSVC "performance warning". </li></ul><ul><li>Fix for NetBSD. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6098" title="#6098: Bugs: asio doesn't compile on NetBSD (closed: fixed)">#6098</a>. </li></ul><ul><li>Fix regression in buffered_write_stream. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6310" title="#6310: Bugs: Buffered write stream broken (closed: fixed)">#6310</a>. </li></ul><ul><li>Fix deadlock on Mac OS X. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6275" title="#6275: Bugs: On Mac OS X deadline_timer::cancel() may hangs (closed: fixed)">#6275</a>. </li></ul><ul><li>On linux, connect can return EAGAIN in certain circumstances. Remap to another error so that it doesn't look like a non-blocking operation. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6048" title="#6048: Bugs: async_connect sometimes returns succes in case of error (closed: fixed)">#6048</a>. </li></ul><ul><li>Fix non-paged pool "leak" on Windows when io_service is repeatedly run without anything to do. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6321" title="#6321: Bugs: non-paged pool memory leak in win_iocp_io_service (closed: fixed)">#6321</a>. </li></ul><ul><li>Disable object_handle on Windows CE. </li></ul><ul><li>Add extra include required for OVERLAPPED struct. </li></ul><ul><li>Fix doxygen comments. </li></ul><ul><li>Update documentation. </li></ul><ul><li>Add missing class. </li></ul><ul><li>Update copyright year. </li></ul> Ticket anonymous Thu, 28 Jun 2012 18:43:35 GMT <link>https://svn.boost.org/trac10/ticket/6310#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6310#comment:3</guid> <description> <p> Is it possible that this same issue affects the write_some_handler::operator() in buffered_write_stream.hpp? It appears that in previous code it was also appending orig_size to the destination buffer. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Sun, 15 Jul 2012 04:11:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6310#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6310#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/79518" title="Fix another regression in buffered_write_stream. Refs #6310">[79518]</a>) Fix another regression in buffered_write_stream. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6310" title="#6310: Bugs: Buffered write stream broken (closed: fixed)">#6310</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Mon, 16 Jul 2012 06:26:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6310#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6310#comment:5</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/79549" title="Merge from trunk: * Make strand destruction a no-op, to allow strand ...">[79549]</a>) Merge from trunk: </p> <ul><li>Make strand destruction a no-op, to allow strand objects to be destroyed after their associated io_service has been destroyed. </li></ul><ul><li>Use the <span class="underline">thread keyword extension when compiling with gcc on linux x86. </span></li></ul><ul><li>Avoid calling work_finished() if a completion handler creates more work. </li></ul><ul><li>Eliminate redundant call to call_stack::contains(this) when dispatching a completion handler. </li></ul><ul><li>Add support for some newer versions of glibc which provide the epoll_create1 function but always fail with ENOSYS. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7012" title="#7012: Bugs: do_epoll_create failes with 'epoll: Function not supported&#34;. (closed: fixed)">#7012</a> </li></ul><ul><li>Use SSE2 load and store fences. </li></ul><ul><li>Throw exception if SSL engine initialisation fails. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6303" title="#6303: Bugs: possible crash in ssl stream initialization (closed: fixed)">#6303</a> </li></ul><ul><li>Fix another regression in buffered_write_stream. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6310" title="#6310: Bugs: Buffered write stream broken (closed: fixed)">#6310</a> </li></ul> </description> <category>Ticket</category> </item> </channel> </rss>