Boost C++ Libraries: Ticket #10561: Bugs in dual seekable mode https://svn.boost.org/trac10/ticket/10561 <p> Currently there are no tests for dual seekable streams. So the first thing to do is to add some tests. See dual_seekable_test.cpp attached. These tests uncover the following bugs: </p> <ol><li>The functions test_seekable_in_chars and test_seekable_in_chunks in test/detail/verification.hpp use seekp in several places where seekg should be used. This has no effect when there is a single head but does not work when the stream is dual seekable. A new verification function test_dual_seekable was added and tested. See attached verification.hpp. </li><li>indirect_streambuf::seek_impl does not work for dual seeking. The problem is that both heads are modified for both input and output operations. Since the modification is the same (just resetting the pointers) everything works when there is a single head. This is a duplicate of <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/7681"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/7681</a>. Solved in the attached indirect_streambuf.hpp </li><li>The function shared_buffer() does not consider dual_seekable stream buffers as shared. Solved in the attached indirect_streambuf.hpp </li><li>The function init_put_area() does not consider the existing input position. This is a duplicate of <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/8572"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/8572</a>. Solved in the attached indirect_streambuf.hpp </li></ol><p> With the attached versions of verification.hpp and indirect_streambuf.hpp all previously existing tests passed. I recommend adding the new tests in dual_seekable_test.cpp. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10561 Trac 1.4.3 jlodos@… Mon, 29 Sep 2014 14:20:04 GMT attachment set https://svn.boost.org/trac10/ticket/10561 https://svn.boost.org/trac10/ticket/10561 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">verification.hpp</span> </li> </ul> Ticket jlodos@… Mon, 29 Sep 2014 14:20:59 GMT attachment set https://svn.boost.org/trac10/ticket/10561 https://svn.boost.org/trac10/ticket/10561 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">indirect_streambuf.hpp</span> </li> </ul> Ticket jlodos@… Mon, 29 Sep 2014 14:23:32 GMT attachment set https://svn.boost.org/trac10/ticket/10561 https://svn.boost.org/trac10/ticket/10561 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dual_seekable_test.cpp</span> </li> </ul> Ticket jlodos@… Mon, 06 Oct 2014 13:16:25 GMT <link>https://svn.boost.org/trac10/ticket/10561#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10561#comment:1</guid> <description> <p> Forgot this: </p> <ol start="5"><li>Bug in the example file container_device.hpp. The function seek (line 138) checks for errors with next &gt;= container_.size(). But container_.size() is a valid value indicating EOF. It should be next &gt; container_.size(). </li></ol> </description> <category>Ticket</category> </item> </channel> </rss>