Besides this patch, one workaround that I have also used is switching to
On Thursday, January 2, 2014 11:47:26 AM UTC-8, prot...@googlecode.com
> Status: New
> Owner: ----
> Labels: Type-Defect Priority-Medium
> New issue 592 by abhishek...@gmail.com: OstreamOutputStream with ofstream
> loses data from the tail
> What steps will reproduce the problem?
> 1. Use an OstreamOutputStream with an ofstream as the underlying IO
> 2. Write data that is not aligned to the buffer boundary for the ofstream
> implementation. This happens surprisingly often for me (e.g. try writing
> somewhere between 8192 and 8192+127 bytes). It happens even with fewer
> 3. Alternatively, the attached patch adds a test to
> zero_copy_stream_unittest.cc which fails without the attached fix.
> What is the expected output? What do you see instead?
> Expected output is that OstreamOutputStream should work regardless of the
> amount of data written. The attached fix addresses this issue by adding a
> Flush operation to the underlying implementation.
> Please use labels and text to provide additional information.
> Protobuf version 2.5.0
> gcc version used was 4.8.1, clang version 3.0
> protobuf-OstreamOutputStream.patch 2.8 KB
> You received this message because this project is configured to send all
> issue notifications to this address.
> You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.