[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
https://bugzilla.novell.com/show_bug.cgi?id=695093
https://bugzilla.novell.com/show_bug.cgi?id=695093#c0
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:
49
-1
Expected Results:
49
50
How often does this happen?
Always
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