cpython/Modules
Victor Stinner 517cd82ea7
gh-108987: Fix _thread.start_new_thread() race condition (#109135)
Fix _thread.start_new_thread() race condition. If a thread is created
during Python finalization, the newly spawned thread now exits
immediately instead of trying to access freed memory and lead to a
crash.

thread_run() calls PyEval_AcquireThread() which checks if the thread
must exit. The problem was that tstate was dereferenced earlier in
_PyThreadState_Bind() which leads to a crash most of the time.

Move _PyThreadState_CheckConsistency() from thread_run() to
_PyThreadState_Bind().
2023-09-11 17:27:03 +02:00
..
_blake2
_ctypes gh-106320: Remove private _PyErr_WriteUnraisableMsg() (#108863) 2023-09-05 01:54:55 +02:00
_decimal gh-108767: Replace ctype.h functions with pyctype.h functions (#108772) 2023-09-01 18:36:53 +02:00
_hacl
_io gh-108494: Argument Clinic: inline parsing code for positional-only parameters in the limited C API (GH-108622) 2023-09-03 17:28:14 +03:00
_multiprocessing gh-108494: Argument Clinic: inline parsing code for positional-only parameters in the limited C API (GH-108622) 2023-09-03 17:28:14 +03:00
_sqlite
_sre gh-108765: Python.h no longer includes <ctype.h> (#108831) 2023-09-03 18:54:27 +02:00
_ssl
_testcapi gh-109050: Remove remaining tests for legacy Unicode C API (GH-109068) 2023-09-09 05:44:46 +00:00
_testinternalcapi gh-108777: Split _PyTime tests from _testinternalcapi.c (gh-108787) 2023-09-02 00:46:36 +00:00
_xxtestfuzz
cjkcodecs
clinic gh-108717: Speedup os.DirEntry.is_junction function (#108718) 2023-09-06 08:52:53 +00:00
expat
_abc.c
_asynciomodule.c
_bisectmodule.c
_bz2module.c
_codecsmodule.c
_collectionsmodule.c
_contextvarsmodule.c
_csv.c
_curses_panel.c
_cursesmodule.c
_datetimemodule.c gh-108751: Add copy.replace() function (GH-108752) 2023-09-06 23:55:42 +03:00
_dbmmodule.c
_elementtree.c
_functoolsmodule.c
_gdbmmodule.c
_hashopenssl.c
_heapqmodule.c
_json.c
_localemodule.c gh-108765: Python.h no longer includes <ctype.h> (#108831) 2023-09-03 18:54:27 +02:00
_lsprof.c gh-106320: Remove private _PyErr_WriteUnraisableMsg() (#108863) 2023-09-05 01:54:55 +02:00
_lzmamodule.c
_math.h
_opcode.c
_operator.c
_pickle.c
_posixsubprocess.c gh-108494: Argument Clinic: inline parsing code for positional-only parameters in the limited C API (GH-108622) 2023-09-03 17:28:14 +03:00
_queuemodule.c
_randommodule.c
_scproxy.c
_ssl.c
_ssl.h
_ssl_data.h
_ssl_data_31.h
_ssl_data_111.h
_ssl_data_300.h
_stat.c
_statisticsmodule.c
_struct.c gh-108765: Python.h no longer includes <ctype.h> (#108831) 2023-09-03 18:54:27 +02:00
_testbuffer.c
_testcapi_feature_macros.inc
_testcapimodule.c GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT (#108507) 2023-09-08 09:48:28 +00:00
_testclinic.c
_testclinic_limited.c
_testimportmultiple.c
_testinternalcapi.c GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT (#108507) 2023-09-08 09:48:28 +00:00
_testmultiphase.c
_testsinglephase.c
_threadmodule.c gh-108987: Fix _thread.start_new_thread() race condition (#109135) 2023-09-11 17:27:03 +02:00
_tkinter.c gh-108765: Python.h no longer includes <ctype.h> (#108831) 2023-09-03 18:54:27 +02:00
_tracemalloc.c
_typingmodule.c
_uuidmodule.c
_weakref.c
_winapi.c
_xxinterpchannelsmodule.c
_xxsubinterpretersmodule.c
_zoneinfo.c gh-108765: Python.h no longer includes <ctype.h> (#108831) 2023-09-03 18:54:27 +02:00
addrinfo.h
arraymodule.c
atexitmodule.c gh-106320: Remove private _PyErr_WriteUnraisableMsg() (#108863) 2023-09-05 01:54:55 +02:00
binascii.c
cmathmodule.c
config.c.in
errnomodule.c
faulthandler.c
fcntlmodule.c
gc_weakref.txt
gcmodule.c gh-108753: Enhance pystats (#108754) 2023-09-06 15:54:59 +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-106320: Remove private _PyErr_WriteUnraisableMsg() (#108863) 2023-09-05 01:54:55 +02:00
getpath.py
getpath_noop.c
grpmodule.c gh-108765: Python.h no longer includes <unistd.h> (#108783) 2023-09-02 16:50:18 +02:00
hashlib.h
itertoolsmodule.c
ld_so_aix.in
main.c
makesetup
makexp_aix
mathmodule.c gh-102837: improve test coverage for math module (#102523) 2023-09-03 01:48:47 -07:00
md5module.c
mmapmodule.c gh-108765: Python.h no longer includes <unistd.h> (#108783) 2023-09-02 16:50:18 +02:00
overlapped.c gh-108494: Argument Clinic: inline parsing code for positional-only parameters in the limited C API (GH-108622) 2023-09-03 17:28:14 +03:00
posixmodule.c gh-108717: Speedup os.DirEntry.is_junction function (#108718) 2023-09-06 08:52:53 +00: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-108765: Python.h no longer includes <ctype.h> (#108831) 2023-09-03 18:54:27 +02:00
readline.c gh-108765: Python.h no longer includes <sys/time.h> (#108775) 2023-09-02 17:51:19 +02:00
README
resource.c gh-108494: Argument Clinic: inline parsing code for positional-only parameters in the limited C API (GH-108622) 2023-09-03 17:28:14 +03:00
rotatingtree.c
rotatingtree.h
selectmodule.c gh-108765: Python.h no longer includes <unistd.h> (#108783) 2023-09-02 16:50:18 +02:00
Setup
Setup.bootstrap.in
Setup.stdlib.in gh-108777: Split _PyTime tests from _testinternalcapi.c (gh-108787) 2023-09-02 00:46:36 +00:00
sha1module.c
sha2module.c
sha3module.c
signalmodule.c gh-108765: Python.h no longer includes <sys/time.h> (#108775) 2023-09-02 17:51:19 +02:00
socketmodule.c gh-63760: Don't declare gethostname() on Solaris (#108817) 2023-09-02 17:54:59 +00:00
socketmodule.h
symtablemodule.c
syslogmodule.c
termios.c gh-108765: include <unistd.h> in termios.c on Solaris (#108825) 2023-09-02 18:57:47 +00:00
timemodule.c gh-108294: Add error handling for time.sleep audit event (GH-108363) 2023-09-05 10:25:08 +02:00
tkappinit.c
tkinter.h
unicodedata.c
unicodedata_db.h
unicodename_db.h
winreparse.h
xxlimited.c
xxlimited_35.c
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

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