[I18n-sig] UTF-8 decoder in CVS still buggy
M.-A. Lemburg
mal@lemburg.com
Sun, 16 Jul 2000 15:29:58 +0200
Florian Weimer wrote:
>
> The UTF-8 decoder is still buggy (i.e. it doesn't pass Markus Kuhn's
> stress test), mainly due to the following construct:
>
> #define UTF8_ERROR(details) do { \
> if (utf8_decoding_error(&s, &p, errors, details)) \
> goto onError; \
> continue; \
> } while (0)
>
> (The "continue" statement is supposed to exit from the outer loop,
> but of course, it doesn't. Indeed, this is a marvelous example of
> the dangers of the C programming language and especially of the C
> preprocessor.)
>
> I've already sent a patch quite some time ago, but nobody bothered to
> apply it to the CVS tree.
Sorry about that.
> Shall I resend it or shall I assume that
> the Python developers don't care about this problem?
I've checked in a fix which should remedy the problem.
Could you run the stress test using the fixed
interpreter ?
BTW, how much code is the stress test ? Maybe we should add
some of it to the test suite.
Thanks,
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/