➜

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
标题: CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error
类型: Stage:
Components: Versions: Python 3.4
process
状态: closed Resolution: fixed
Dependencies: 后续:
分配给: 抄送列表: larry, python-dev, vstinner
优先级: release blocker 关键字:

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) 日期: 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) 日期: 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) 日期: 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) 日期: 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) 日期: 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) 日期: 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) 日期: 2013-10-29 00:02
I should now be fixed.
历史
日期 用户 动作 参数
2022-04-11 14:57:48admin修改github: 62709
2013-10-29 00:02:43vstinner修改状态: open -> closed
resolution: fixed
消息: + msg201591
2013-10-29 00:02:20python-dev修改抄送: + python-dev
消息: + msg201590
2013-10-19 01:43:24larry修改消息: + msg200357
2013-10-19 01:33:20vstinner修改消息: + msg200354
2013-10-19 01:24:11larry修改消息: + msg200352
2013-10-12 13:21:47vstinner修改优先级: normal -> release blocker
抄送: + larry
消息: + msg199569

2013-07-19 22:00:47vstinner创建