Issue 18509: CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error (original) (raw)

Created on 2013-07-19 22:00 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg193381 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-07-19 22:00
I modified CJK codecs to reuse the new PyUnicodeWriter API (to use the PEP 393 instead of Py_UNICODE*). The problem is that PyUnicodeWriter error is not handled correctly: the decoder should return MBERR_EXCEPTION, whereas the error is not handled at all currently. I found this issue while working on issue #18408, using the pyfailmalloc tool to inject faults (memory allocation error).
msg199569 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-12 13:21
This is a regression of Python 3.4, so it would be nice to fix it before the Python 3.4 final.
msg200352 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-10-19 01:24
Victor, are you going to write a patch for this before beta 1?
msg200354 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-19 01:33
> Victor, are you going to write a patch for this before beta 1? Not before at least one week, I'm busy on tracemalloc. If anyone is interesting, please write a patch and I will review it :-) (The CJK macros are ugly!)
msg200357 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-10-19 01:43
It's a month before beta 1. This weekend is alpha 4; it'd be nice if it were fixed for that, of course, but that does not seem likely.
msg201590 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-29 00:02
New changeset f63d34cd3714 by Victor Stinner in branch 'default': Issue #18509: handle PyUnicode_Writer() error http://hg.python.org/cpython/rev/f63d34cd3714
msg201591 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-29 00:02
I should now be fixed.
History
Date User Action Args
2022-04-11 14:57:48 admin set github: 62709
2013-10-29 00:02:43 vstinner set status: open -> closedresolution: fixedmessages: +
2013-10-29 00:02:20 python-dev set nosy: + python-devmessages: +
2013-10-19 01:43:24 larry set messages: +
2013-10-19 01:33:20 vstinner set messages: +
2013-10-19 01:24:11 larry set messages: +
2013-10-12 13:21:47 vstinner set priority: normal -> release blockernosy: + larrymessages: +
2013-07-19 22:00:47 vstinner create