[Mono-bugs] [Bug 75679][Nor] New - sometimes SeekableStreamReader translates buffers into incorrect chars

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Aug 1 05:11:52 EDT 2005

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi at ximian.com.


--- shadow/75679	2005-08-01 05:11:52.000000000 -0400
+++ shadow/75679.tmp.3201	2005-08-01 05:11:52.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 75679
+Product: Mono: Compilers
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: sometimes SeekableStreamReader translates buffers into incorrect chars
+SeekableStreamReader sometimes reads characters incorrectly. 
+Steps to reproduce the problem:
+Compile attached example with -coodepage:932.
+Actual Results:
+syntax error, got token `INTERR'
+ImageCache.cs: (1) error CS8025: Parsing error
+Compilation failed: 1 error(s), 0 warnings
+Expected Results:
+Passes tokenization (and shows further errors).
+How often does this happen? 
+It consistently happens on the same source. However, it does not always
+happen when we try to extract the source of the problem. Maybe it depends
+on the size, certain position of characters, and so on.
+Additional Information:
+It is not problem in encoding classes. I ran mcs.exe under MS .NET
+Framework and it resulted in the same error.
+There seems something wrong with our SeekableStreamReader. With the
+attached "patch" for support.cs, the problem goes away.
+One thing that came up to my mind is that Encoding (Encoder) class often
+stores incomplete bytes in themselves. In that case, when we seek the
+stream back and try to convert bytes to chars, the incomplete bytes could
+harm translation. (SeekableStreamReader would not be a good idea?)

More information about the mono-bugs mailing list