cpython/Modules
Sam Gross a3c031884d
gh-112723: Call `PyThreadState_Clear()` from the correct interpreter (#112776)
The `PyThreadState_Clear()` function must only be called with the GIL
held and must be called from the same interpreter as the passed in
thread state. Otherwise, any Python objects on the thread state may be
destroyed using the wrong interpreter, leading to memory corruption.

This is also important for `Py_GIL_DISABLED` builds because free lists
will be associated with PyThreadStates and cleared in
`PyThreadState_Clear()`.

This fixes two places that called `PyThreadState_Clear()` from the wrong
interpreter and adds an assertion to `PyThreadState_Clear()`.
2023-12-12 17:20:21 -07:00
..
_blake2 gh-111916: Make hashlib related modules thread-safe without the GIL (#111981) 2023-11-15 23:53:38 +00:00
_ctypes gh-110190: Fix ctypes structs with array on Arm (#112604) 2023-12-05 16:07:50 +01:00
_decimal gh-89902: Deprecate non-standard format specifier "N" for Decimal (GH-110508) 2023-10-08 10:01:39 +03:00
_hacl
_io gh-112205: Update stringio module to use AC for the thread-safe (gh-112549) 2023-12-01 08:37:30 +09:00
_multiprocessing gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
_sqlite gh-111789: Simplify the sqlite code (GH-111829) 2023-11-10 20:49:24 +00:00
_sre Output more details in the re tracing (GH-111357) 2023-10-26 16:42:42 +03:00
_ssl gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
_testcapi gh-111545: Add Py_HashPointer() function (#112096) 2023-12-06 15:09:22 +01:00
_testinternalcapi gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
_xxtestfuzz Add a fuzzer for `Py_CompileStringExFlags` (#111721) 2023-12-10 12:16:15 -05:00
cjkcodecs gh-111089: Revert PyUnicode_AsUTF8() changes (#111833) 2023-11-07 22:36:13 +00:00
clinic gh-112730: Use color to highlight error locations (gh-112732) 2023-12-06 23:29:54 +01:00
expat
README
Setup gh-76785: More Fixes for test.support.interpreters (gh-113012) 2023-12-12 17:43:30 +00:00
Setup.bootstrap.in gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
Setup.stdlib.in gh-76785: More Fixes for test.support.interpreters (gh-113012) 2023-12-12 17:43:30 +00:00
_abc.c gh-106320: Move private _PySet API to the internal API (#107041) 2023-07-22 17:04:34 +02:00
_asynciomodule.c gh-111789: Use PyDict_GetItemRef() in Modules/_asynciomodule.c (GH-112072) 2023-11-15 04:28:30 +00:00
_bisectmodule.c
_bz2module.c gh-108220: Internal header files require Py_BUILD_CORE to be defined (#108221) 2023-08-21 19:15:52 +02:00
_codecsmodule.c
_collectionsmodule.c gh-106320: Remove private _PyDict functions (#108449) 2023-08-24 20:01:50 +00:00
_contextvarsmodule.c
_csv.c gh-111789: Use PyDict_GetItemRef() in Modules/_csv.c (gh-112073) 2023-11-27 18:35:52 +01:00
_curses_panel.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
_cursesmodule.c gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094) 2023-10-20 18:08:41 +03:00
_datetimemodule.c Fix undefined behaviour in datetime.time.fromisoformat() (#111982) 2023-11-12 00:56:27 +01:00
_dbmmodule.c Remove redundant check in dbm.open() (GH-111844) 2023-11-08 19:42:41 +02:00
_elementtree.c gh-108511: Add C API functions which do not silently ignore errors (GH-109025) 2023-09-17 14:23:31 +03:00
_functoolsmodule.c gh-111903: Update AC to support "pycore_critical_section.h" header (gh-112251) 2023-11-19 10:13:58 +09:00
_gdbmmodule.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
_hashopenssl.c gh-111916: Make hashlib related modules thread-safe without the GIL (#111981) 2023-11-15 23:53:38 +00:00
_heapqmodule.c gh-86493: Modernize modules initialization code (GH-106858) 2023-07-25 14:34:49 +03:00
_json.c gh-111928: make "memo" dict local to scan_once call (gh-112005) 2023-11-13 04:58:34 +00:00
_localemodule.c gh-108765: Python.h no longer includes <ctype.h> (#108831) 2023-09-03 18:54:27 +02:00
_lsprof.c gh-108082: Use PyErr_FormatUnraisable() (GH-111580) 2023-11-02 09:16:34 +00:00
_lzmamodule.c gh-108220: Internal header files require Py_BUILD_CORE to be defined (#108221) 2023-08-21 19:15:52 +02:00
_math.h
_opcode.c gh-107149: make new opcode util functions private rather than public and unstable (#112042) 2023-11-14 00:31:02 +00:00
_operator.c gh-89013: Improve the performance of methodcaller (lazy version) (gh-107201) 2023-08-01 15:45:51 +09:00
_pickle.c bpo-41422: Visit the Pickler's and Unpickler's memo in tp_traverse (GH-21664) 2023-11-27 18:09:41 +00:00
_posixsubprocess.c gh-112334: Restore subprocess's use of `vfork()` & fix `extra_groups=[]` behavior (#112617) 2023-12-04 15:08:19 -08:00
_queuemodule.c gh-84570: Add Timeouts to SendChannel.send() and RecvChannel.recv() (gh-110567) 2023-10-17 23:05:49 +00:00
_randommodule.c gh-112071: Make `_random.Random` methods thread-safe in `--disable-gil` builds (gh-112128) 2023-11-28 03:27:39 +00:00
_scproxy.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
_ssl.c gh-112454: Disable TLS-PSK if OpenSSL was built without PSK support (#112491) 2023-11-28 16:15:39 -08:00
_ssl.h
_ssl_data.h
_ssl_data_31.h
_ssl_data_111.h
_ssl_data_300.h
_stat.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
_statisticsmodule.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
_struct.c gh-111789: Use PyDict_GetItemRef() in Modules/_struct.c (gh-112076) 2023-11-27 18:41:47 +01:00
_sysconfig.c gh-111863: Rename term Py_NOGIL to Py_GIL_DISABLED in sysconfig (gh-112307) 2023-11-22 10:32:43 +09:00
_testbuffer.c
_testcapi_feature_macros.inc
_testcapimodule.c gh-76785: Fixes for test.support.interpreters (gh-112982) 2023-12-12 08:24:31 -07:00
_testclinic.c gh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vararg with NULL (#110868) 2023-10-16 13:42:44 +02:00
_testclinic_limited.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
_testimportmultiple.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
_testinternalcapi.c gh-76785: Fixes for test.support.interpreters (gh-112982) 2023-12-12 08:24:31 -07:00
_testmultiphase.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
_testsinglephase.c gh-86493: Use PyModule_Add() instead of PyModule_AddObjectRef() (GH-106860) 2023-07-18 23:59:53 +03:00
_threadmodule.c gh-111789: Use PyDict_GetItemRef() in Modules/_threadmodule.c (gh-112077) 2023-11-27 18:46:43 +01:00
_tkinter.c gh-112678: Declare `Tkapp_CallDeallocArgs()` as `static` (GH-112679) 2023-12-04 08:00:27 +00:00
_tracemalloc.c gh-108494: Argument Clinic: fix support of Limited C API (GH-108536) 2023-08-28 16:04:27 +03:00
_typingmodule.c Improve `_typing.__doc__` (#107908) 2023-08-13 10:24:59 +01:00
_uuidmodule.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
_weakref.c gh-112213: Update _weakref module to use new AC feature (gh-112250) 2023-11-19 10:43:51 +09:00
_winapi.c gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094) 2023-10-20 18:08:41 +03:00
_xxinterpchannelsmodule.c gh-76785: More Fixes for test.support.interpreters (gh-113012) 2023-12-12 17:43:30 +00:00
_xxinterpqueuesmodule.c gh-76785: More Fixes for test.support.interpreters (gh-113012) 2023-12-12 17:43:30 +00:00
_xxsubinterpretersmodule.c gh-112723: Call `PyThreadState_Clear()` from the correct interpreter (#112776) 2023-12-12 17:20:21 -07:00
_zoneinfo.c Simplify trivial calls of PyUnicode_FromFormat() (GH-111605) 2023-11-01 19:54:32 +02:00
addrinfo.h
arraymodule.c gh-106320: Re-add some PyLong/PyDict C-API functions (GH-#111162) 2023-10-25 11:33:48 +02:00
atexitmodule.c gh-108082: Remove _PyErr_WriteUnraisableMsg() (GH-111643) 2023-11-03 09:45:53 +02:00
binascii.c gh-105967: Work around a macOS bug, limit zlib C library crc32 API calls to 1gig (#112615) 2023-12-04 12:04:05 -08:00
cmathmodule.c
config.c.in gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727) 2023-10-12 09:34:35 +02:00
errnomodule.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
faulthandler.c gh-110014: Include explicitly <unistd.h> header (#110155) 2023-09-30 20:06:45 +00:00
fcntlmodule.c gh-107913: Fix possible losses of OSError error codes (GH-107930) 2023-08-27 00:35:06 +03:00
gc_weakref.txt
gcmodule.c gh-112529: Use atomic operations for `gcstate->collecting` (#112533) 2023-12-11 18:33:21 +00:00
getaddrinfo.c gh-108767: Replace ctype.h functions with pyctype.h functions (#108772) 2023-09-01 18:36:53 +02:00
getbuildinfo.c
getnameinfo.c
getpath.c gh-59703: restore include of mach-o/dyld.h (gh-112309) 2023-11-22 01:20:57 -05:00
getpath.py gh-106718: Treat PyConfig.stdlib_dir as highest-priority setting for stdlib_dir when calculating paths (GH-108730) 2023-11-01 21:11:18 +00:00
getpath_noop.c
grpmodule.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
hashlib.h gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
itertoolsmodule.c gh-109786: Fix leaks and crash when re-enter itertools.pairwise.__next__() (GH-109788) 2023-12-04 11:47:55 +00:00
ld_so_aix.in
main.c gh-67224: Show source lines in tracebacks when using the -c option when running Python (#111200) 2023-10-26 15:17:28 +09:00
makesetup
makexp_aix
mathmodule.c gh-111342: fix typo in math.sumprod (GH-111416) 2023-10-27 23:52:04 -05:00
md5module.c gh-111916: Make hashlib related modules thread-safe without the GIL (#111981) 2023-11-15 23:53:38 +00:00
mmapmodule.c gh-111835: Add seekable method to mmap.mmap (gh-111852) 2023-11-09 20:13:35 +09:00
overlapped.c gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094) 2023-10-20 18:08:41 +03:00
posixmodule.c gh-112730: Use color to highlight error locations (gh-112732) 2023-12-06 23:29:54 +01:00
posixmodule.h gh-107211: No longer export internal _PyLong_FromUid() (#109037) 2023-09-07 02:09:06 +02:00
pwdmodule.c gh-108765: Python.h no longer includes <unistd.h> (#108783) 2023-09-02 16:50:18 +02:00
pyexpat.c gh-111789: Use PyDict_GetItemRef() in Modules/pyexpat.c (gh-112079) 2023-11-27 18:51:31 +01:00
readline.c gh-105323: Remove `WITH_APPLE_EDITLINE` to use the same declaration for all editline (gh-112513) 2023-12-05 23:52:28 +09:00
resource.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
rotatingtree.c
rotatingtree.h
selectmodule.c gh-110395: invalidate open kqueues after fork (#110517) 2023-11-04 21:45:24 +00:00
sha1module.c gh-111916: Make hashlib related modules thread-safe without the GIL (#111981) 2023-11-15 23:53:38 +00:00
sha2module.c gh-111916: Make hashlib related modules thread-safe without the GIL (#111981) 2023-11-15 23:53:38 +00:00
sha3module.c gh-111916: Make hashlib related modules thread-safe without the GIL (#111981) 2023-11-15 23:53:38 +00:00
signalmodule.c gh-108082: Use PyErr_FormatUnraisable() (GH-111580) 2023-11-02 09:16:34 +00:00
socketmodule.c bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503) 2023-12-01 15:16:49 +00:00
socketmodule.h GH-107812: extend `socket`'s netlink support to FreeBSD (gh-107813) 2023-08-10 00:47:46 +00:00
symtablemodule.c gh-110045: Update symtable module for PEP 695 (#110066) 2023-09-29 02:08:04 +00:00
syslogmodule.c gh-87286: Add a number of LOG_* constants to syslog (#24432) 2023-12-12 10:25:51 +01:00
termios.c gh-51944: fix type and missing addition in gh-112823 (#112996) 2023-12-12 13:57:45 +01:00
timemodule.c gh-112567: Add _PyTimeFraction C API (#112568) 2023-12-01 19:50:10 +01:00
tkappinit.c
tkinter.h
unicodedata.c gh-96954: use a directed acyclic word graph for storing the unicodedata codepoint names (#97906) 2023-11-04 15:56:58 +01:00
unicodedata_db.h gh-96954: Fix `make regen-unicodedata` in out-of-tree builds (#112118) 2023-11-15 16:42:17 +00:00
unicodename_db.h gh-96954: Fix `make regen-unicodedata` in out-of-tree builds (#112118) 2023-11-15 16:42:17 +00:00
winreparse.h
xxlimited.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
xxlimited_35.c gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864) 2023-11-20 15:52:00 +02:00
xxmodule.c
xxsubtype.c gh-108765: Python.h no longer includes <sys/time.h> (#108775) 2023-09-02 17:51:19 +02:00
zlibmodule.c gh-105967: Work around a macOS bug, limit zlib C library crc32 API calls to 1gig (#112615) 2023-12-04 12:04:05 -08:00

README

Source files for standard library extension modules,
and former extension modules that are now builtin modules.