Message306585
| Author |
eric.snow |
| Recipients |
eric.snow, ncoghlan, serhiy.storchaka, vstinner |
| Date |
2017年11月20日.21:28:36 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1511213316.33.0.213398074469.issue32096@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
(see the python-dev thread [1])
(related: issue #32086)
When I consolidated the global runtime state into a single global, _PyRuntime, calls Py_DecodeLocale() started to break if the runtime hadn't been intialized yet. This is because that function relies on PyMem_RawMalloc() and PyMem_RawFree(), which rely on the raw allocator having been initialized as part of the runtime (it used to be intialized statically).
The documentation for various "Process-wide parameters" [2] explicitly directs users to call Py_DecodeLocale() where necessary. The docs for Py_DecodeLocale(), in turn, explicitly refer to calling PyMem_RawFree(). So changing the pre-runtime-init behavior of Py_DecodeLocale() and PyMem_RawFree() is a regression that should be fixed.
[1] https://mail.python.org/pipermail/python-dev/2017-November/150605.html
[2] https://docs.python.org/3/c-api/init.html#process-wide-parameters |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年11月20日 21:28:36 | eric.snow | set | recipients:
+ eric.snow, ncoghlan, vstinner, serhiy.storchaka |
| 2017年11月20日 21:28:36 | eric.snow | set | messageid: <1511213316.33.0.213398074469.issue32096@psf.upfronthosting.co.za> |
| 2017年11月20日 21:28:36 | eric.snow | link | issue32096 messages |
| 2017年11月20日 21:28:36 | eric.snow | create |
|