[Mono-bugs] [Bug 695093] New: FileStream.Flush() breaks Read operations

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 20 06:06:01 EDT 2011



           Summary: FileStream.Flush() breaks Read operations
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: 32bit
        OS/Version: Kubuntu
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: psonek2 at seznam.cz
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: ---

Created an attachment (id=430603)
 --> (http://bugzilla.novell.com/attachment.cgi?id=430603)
Test case

Description of Problem:
If you call Flush() between FileStream.Read() methods it can result in
incorrect data read.

Steps to reproduce the problem:
1. Download attached example
2. mono TestStreamFlush.exe

Actual Results:

Expected Results:

How often does this happen? 

Additional Information:
Looking at the FileStream.cs it seems that Flush() discards buffered data.
Second Read() will miss them.

IMO and according to the docs, Flush() after Read() operation should also seek
back the count previously read.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list