[issue23321] Crash in str.decode() with special error handler
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
STINNER Victor added the comment: I closed the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
Serhiy Storchaka added the comment: If you have no enhancements to my quick fix Victor, may be this issue can be closed. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
Serhiy Storchaka added the comment: I think the changeset which made decoders to use _PyUnicodeWriter (issue16311) is responsible of the regression. For example consider b'\x80abc'.decode('utf-8', 'backslashreplace'). The writer reserves string buffer with size 4 (every byte produces at most 1 character). First byte is incorrect and replaced by 4-character string '\\x80'. The writer increases min_length but doesn't resize the buffer because its size is enough to write replacement string. But following writes of ASCII characters cause buffer overflow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
STINNER Victor added the comment: Debugging build crashes in some circumstances in str.decode() (...) buildbots are broken without it Is it a regression? Would it be possible to identify the changeset responsible of the regression? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
Roundup Robot added the comment: New changeset 1e8937861ee3 by Victor Stinner in branch 'default': Issue #22286, #23321: Fix failing test on Windows code page 932 https://hg.python.org/cpython/rev/1e8937861ee3 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
New submission from Serhiy Storchaka: Debugging build crashes in some circumstances in str.decode() with error handler which produces replacement string with length larger than malformed data. For example the backslashreplace error handler produces 4-character string for every illegal byte. All other standard error handlers produce no longer than 1 character for every illegal unit. Here is a patch which fixes this issue. I'll commit it without review because buildbots are broken without it. This issue is open for reference and post-commit review. -- assignee: serhiy.storchaka components: Interpreter Core files: unicode_decode_call_errorhandler_writer.patch keywords: patch messages: 234705 nosy: haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Crash in str.decode() with special error handler type: crash versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37861/unicode_decode_call_errorhandler_writer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
Roundup Robot added the comment: New changeset 2de90090e486 by Serhiy Storchaka in branch '3.4': Issue #23321: Fixed a crash in str.decode() when error handler returned https://hg.python.org/cpython/rev/2de90090e486 New changeset 1cd68b3c46aa by Serhiy Storchaka in branch 'default': Issue #23321: Fixed a crash in str.decode() when error handler returned https://hg.python.org/cpython/rev/1cd68b3c46aa -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23321] Crash in str.decode() with special error handler
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23321 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com