This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error
Type: Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: larry, python-dev, vstinner
Priority: release blocker Keywords:

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:48adminsetgithub: 62709
2013-10-29 00:02:43vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg201591
2013-10-29 00:02:20python-devsetnosy: + python-dev
messages: + msg201590
2013-10-19 01:43:24larrysetmessages: + msg200357
2013-10-19 01:33:20vstinnersetmessages: + msg200354
2013-10-19 01:24:11larrysetmessages: + msg200352
2013-10-12 13:21:47vstinnersetpriority: normal -> release blocker
nosy: + larry
messages: + msg199569

2013-07-19 22:00:47vstinnercreate