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 vstinner
Recipients benjamin.peterson, eryksun, ezio.melotti, larry, lemburg, pitrou, random832, serhiy.storchaka, steven.daprano, terry.reedy, vstinner, Árpád Kósa
Date 2015-11-23.21:48:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448315326.73.0.043465644132.issue25709@psf.upfronthosting.co.za>
In-reply-to
Content
" and wow this is badly broken "

I mean the currently code is badly broken.

The bug is that sometimes, when a string is resized (which doesn't make sense, strings are immutable, right? :-D), the cached UTF-8 string can become corrupted (old pointer not updated).

It occurs if

* the string is resized (ex: "s += s2")
* the string has a cached UTF-8 byte string (ex: int(s) was called before the resize)
* the resize moves the memory block to a new address

Ok, it's probably unlikely to get these 3 conditions, but from my point of view, it's a major bug because it's in a Python fundamental type (str), it's not a bug in user code and it cannot be worked around (easily).
History
Date User Action Args
2015-11-23 21:48:46vstinnersetrecipients: + vstinner, lemburg, terry.reedy, pitrou, larry, benjamin.peterson, ezio.melotti, steven.daprano, serhiy.storchaka, eryksun, random832, Árpád Kósa
2015-11-23 21:48:46vstinnersetmessageid: <1448315326.73.0.043465644132.issue25709@psf.upfronthosting.co.za>
2015-11-23 21:48:46vstinnerlinkissue25709 messages
2015-11-23 21:48:46vstinnercreate