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.

Author serhiy.storchaka
Recipients ezio.melotti, serhiy.storchaka, vstinner, xiang.zhang
Date 2018-02-12.11:47:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za>
In-reply-to
Content
Based on discussion in PR 660.

_PyUnicodeWriter_Prepare() is used incorrectly in unicode_decode_call_errorhandler_writer(), _PyUnicode_DecodeUnicodeEscape() and PyUnicode_DecodeRawUnicodeEscape() in Objects/unicodeobject.c. The second argument is the number of characters that should be reserved after the current position. But in these places the total minimal size is passed to _PyUnicodeWriter_Prepare(). This can lead to allocating more memory than necessary.
History
Date User Action Args
2018-02-12 11:47:03serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ezio.melotti, xiang.zhang
2018-02-12 11:47:03serhiy.storchakasetmessageid: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za>
2018-02-12 11:47:03serhiy.storchakalinkissue32827 messages
2018-02-12 11:47:03serhiy.storchakacreate