[Mono-dev] mcs bug breaks MD build
Raja R Harinath
rharinath at novell.com
Mon Oct 3 01:39:52 EDT 2005
Hi,
Alexandre Gomes <alexmipego at gmail.com> writes:
> In revision #51007 the mcs/suport.cs file has broken the MD build. The
> problem is when mcs tries to assign the SeekableStreamReader.Position it
> trows an Exception "can't seek that far back: 0".
Should be fixed in SVN r51106. Just an over-eager bounds check. Thanks
for pointing it out.
> After looking the old code I guess that the problem can be related to
> this removed code:
>
> if (value == 0) // Skip preamble
> value = preamble_size;
>
> Just a guess... anyway I reverted my file copy to 51006 and it is
> working ok.
Nope (or in a way yes :-)
The old code was buggy in many ways. It was trying to determine the
state of an abstraction two-deep by reading tea leaves and chicken
entrails (well, actually, it was trying to guess at the appropriate seek
position of the underlying byte stream by looking at the number of
characters read from the surrounding reader -- through two buffers and a
"lossy" decoding step). That snippet of code you point to is the one
that prompted me to rewrite the whole damned thing. (So, in a way, yes.
It's related to its removal ;-)
- Hari
More information about the Mono-devel-list
mailing list