[Python-checkins] python/dist/src/Misc NEWS,1.1155,1.1156
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Sun Oct 10 04:47:36 CEST 2004
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30086/Misc
Modified Files:
NEWS
Log Message:
PyInterpreterState_New(), PyThreadState_New(): use malloc/free directly.
This appears to finish repairs for SF bug 1041645.
This is a critical bugfix.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.1155
retrieving revision 1.1156
diff -u -d -r1.1155 -r1.1156
--- NEWS 10 Oct 2004 01:58:39 -0000 1.1155
+++ NEWS 10 Oct 2004 02:47:33 -0000 1.1156
@@ -136,6 +136,16 @@
C API
-----
+- The C API calls ``PyInterpreterState_New()`` and ``PyThreadState_New()``
+ are two of the very few advertised as being safe to call without holding
+ the GIL. However, this wasn't true in a debug build, as bug 1041645
+ demonstrated. In a debug build, Python redirects the ``PyMem`` family
+ of calls to Python's small-object allocator, to get the benefit of
+ its extra debugging capabilities. But Python's small-object allocator
+ isn't threadsafe, relying on the GIL to avoid the expense of doing its
+ own locking. ``PyInterpreterState_New()`` and ``PyThreadState_New()``
+ call the platform ``malloc()`` directly now, regardless of build type.
+
- PyLong_AsUnsignedLong[Mask] now support int objects as well.
- SF patch #998993: ``PyUnicode_DecodeUTF8Stateful`` and
More information about the Python-checkins
mailing list