homepage

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 skrah
Recipients Arfrever, Gregory.Andersen, amaury.forgeotdarc, franck, georg.brandl, lemburg, ncoghlan, pitrou, serhiy.storchaka, skrah, stutzbach, vstinner
Date 2013年01月09日.22:54:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357772053.04.0.661587544729.issue10156@psf.upfronthosting.co.za>
In-reply-to
Content
Nick, I'm adding you to the nosy list since this issue seems related to PEP 432.
Quick summary: Globals are used in unicodeobject.c before they are initialized.
Also, Unicode objects are created before PyType_Ready(&PyUnicode_Type) has been
called.
This happens during startup:
_Py_InitializeEx_Private():
 _Py_ReadyTypes():
 PyType_Ready(&PyType_Type);
 [...]
 Many Unicode objects like "" or "__add__" are created. Uninitialized
 globals have led to a crash (#16143). This is fixed by Serhiy's patch,
 which always dynamically checks all globals for NULL before using them.
 However, Unicode objects are still created at this point.
 [...]
 PyType_Ready(&PyUnicode_Type); /* Called for the first time */
 [...]
 _PyUnicode_Init:
 for (i = 0; i < 256; i++) /* Could leak if latin1 strings
 unicode_latin1[i] = NULL; have already been created. */
 PyType_Ready(&PyUnicode_Type); /* Called a second time! */
So, considering PEP 432: Are these "pre-type-ready" Unicode objects
safe to use, or should something be done about it?
History
Date User Action Args
2013年01月09日 22:54:13skrahsetrecipients: + skrah, lemburg, georg.brandl, amaury.forgeotdarc, ncoghlan, pitrou, vstinner, stutzbach, Arfrever, serhiy.storchaka, franck, Gregory.Andersen
2013年01月09日 22:54:13skrahsetmessageid: <1357772053.04.0.661587544729.issue10156@psf.upfronthosting.co.za>
2013年01月09日 22:54:12skrahlinkissue10156 messages
2013年01月09日 22:54:12skrahcreate

AltStyle によって変換されたページ (->オリジナル) /