STINNER Victor added the comment:

> Happens for all the multibyte codecs: (...)

All these codecs share the same C implementation: the "CJK" codecs.

The bug was introduced in Python 3.4 by my huge changeset d621bdaed7c3: Issue 
"#17693: CJK encoders now use the new Unicode API (PEP 393)".

It looks like there was no test for this specific bug :-/ Calling reset() just 
after creating a StreamReader object.

Attached patch should fix the crash.

@Aaron1011: Can you please try to write a patch adding a unit test to 
test_codecs reproducing the crash?

----------
keywords: +patch
title: Multibyte codec StreamWriter.reset() crashes -> Crash in the reset() 
method of StreamWriter of CJK codecs
versions: +Python 3.5
Added file: http://bugs.python.org/file39932/cjk_codecs_reset.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23247>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to