Boost logo

Boost :

Subject: [boost] [iostreams]Bugs in dual seekable mode
From: Jorge Lodos (jlodos_at_[hidden])
Date: 2014-09-29 10:43:23

Currently there are no tests for dual seekable streams. New tests (dual_seekable_test.cpp in the ticket) uncover the following bugs:
        1. 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.
        2. 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
        3. The function shared_buffer() does not consider dual_seekable stream buffers as shared.
        4. The function init_put_area() does not consider the existing input position. This is a duplicate of
With the attached (in the ticket) versions of verification.hpp and indirect_streambuf.hpp all previously existing tests passed. I recommend adding the new tests in dual_seekable_test.cpp.
I have created the ticket

Best regards

Boost list run by bdawes at, gregod at, cpdaniel at, john at