cpython/Modules
Pablo Galindo Salgado 65fbec64f6
[3.15] gh-151613: Fix remote debugging frame cache ABA (#152448)
gh-151613: Fix remote debugging frame cache ABA (#151614)

The remote debugging frame cache previously used only the last_profiled_frame address as its cache anchor. If a frame returned and a later frame reused the same _PyInterpreterFrame address, the profiler could accept a stale cache entry and splice parent frames from a different call chain into the current stack.

This adds a last_profiled_frame_seq counter next to last_profiled_frame, increments it when the anchor advances, stores it in frame cache entries, and validates cache hits against both the frame address and the sequence. Cache miss walks now copy stack chunks before storing new cache entries so stored continuations come from a stable snapshot. The new regression test exercises alternating call chains and checks that cached stacks never contain frames from both branches.

(cherry picked from commit 8cda6ae2f1)
2026-06-27 17:42:31 +00:00
..
_ctypes [3.15] gh-151126: Fix crash on unset memory error in ctypes.get_errno (GH-151382) (#151398) 2026-06-12 11:31:51 +00:00
_decimal [3.15] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-150333) 2026-05-24 16:24:08 +03:00
_hacl gh-140120: Refresh HACL* to fix an hmac memory leak (GH-140188) 2025-10-16 05:25:51 +00:00
_io [3.15] gh-151814: Fix unbounded memory growth from repeated empty writes to io.TextIOWrapper (GH-151817) 2026-06-24 12:14:01 +00:00
_multiprocessing [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_remote_debugging [3.15] gh-151613: Fix remote debugging frame cache ABA (#152448) 2026-06-27 17:42:31 +00:00
_sqlite [3.15] gh-150913: Fix sqlite3.Blob validation for empty slice assignment (GH-150915) (GH-150923) 2026-06-04 14:10:30 +00:00
_sre [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
_ssl gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) 2026-03-25 07:44:47 +01:00
_testcapi [3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610) 2026-06-17 18:40:33 +00:00
_testinternalcapi [3.15] gh-151436: Fix missing tstate->last_profiled_frame updates (GH-151437) (#151612) 2026-06-19 10:24:53 +02:00
_testlimitedcapi [3.15] gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252) (GH-151606) 2026-06-18 10:17:15 +02:00
_xxtestfuzz Update and expand the 'Fuzz Tests for CPython' README (#148270) 2026-04-09 08:52:30 +01:00
_zstd [3.15] gh-150285: Fix too long docstrings in the zstd module (GH-150291) (GH-150335) 2026-05-24 16:24:34 +03:00
cjkcodecs [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
clinic [3.15] gh-151929: Get machine ID and uptime on Windows in pythoninfo (#152146) (#152187) 2026-06-25 12:34:16 +00:00
expat [3.15] gh-149698: Update bundled expat to 2.8.1 (GH-149699) (#149812) 2026-05-14 09:52:51 +01:00
_abc.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_asynciomodule.c [3.15] gh-152020: Fix asyncio.all_tasks() loosing eager tasks on FT-build (GH-152022) (#152076) 2026-06-24 12:47:07 +00:00
_bisectmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_bz2module.c [3.15] gh-150599: Prevent bz2 decompressor reuse after errors (GH-150600) 2026-06-07 17:48:30 +01:00
_codecsmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_collectionsmodule.c [3.15] gh-150750: Fix a race condition in deque.index with free-threading (GH-150779) (#150920) 2026-06-04 13:58:59 +00:00
_csv.c gh-145105: Fix crash in csv.reader with re-entrant iterator (GH-145106) 2026-04-11 15:18:02 -07:00
_curses_panel.c [3.15] gh-87904: Document curses classes (GH-151643) (GH-152048) 2026-06-24 10:19:09 +03:00
_cursesmodule.c [3.15] gh-87904: Document curses classes (GH-151643) (GH-152048) 2026-06-24 10:19:09 +03:00
_datetimemodule.c [3.15] gh-152079: Fix _datetime.fromisoformat() mishandling a sub-second tz offset (GH-152087) (#152174) 2026-06-25 09:41:48 +00:00
_dbmmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_elementtree.c [3.15] gh-149571: Fix the C implementation of Element.itertext() (GH-149929) (GH-150509) 2026-05-27 10:52:02 +00:00
_functoolsmodule.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
_gdbmmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_hashopenssl.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_heapqmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_interpchannelsmodule.c [3.15] gh-152156: Fix a crash in interpeters.create under limited memory conditions (GH-152163) (#152269) 2026-06-26 12:11:14 +00:00
_interpqueuesmodule.c [3.15] gh-151763: Fix crash in _interpqueues.create on MemoryError (GH-152131) (#152158) 2026-06-25 07:32:24 +00:00
_interpreters_common.h gh-132775: Use _PyObject_GetXIData (With Fallback) (gh-134440) 2025-05-22 06:50:06 -06:00
_interpretersmodule.c [3.15] gh-151126: Fix missing memory errors in _interpretersmodule.c (GH-151624) (#152169) 2026-06-25 10:35:45 +00:00
_json.c [3.15] gh-152052: Fix misleading json error for \uXXXX escape at the end of input (GH-152053) (#152283) 2026-06-26 14:15:21 +00:00
_localemodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
_lsprof.c gh-145846: Fix memory leak in _lsprof clearEntries() context chain (#145847) 2026-04-07 22:56:19 +02:00
_lzmamodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_math.h gh-122681: remove m_atan2()/c_atan2() helpers (#122715) 2024-08-17 13:48:16 +05:30
_opcode.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_operator.c GH-145247: Use _PyTuple_FromPair in Modules (part 1) (#148000) 2026-04-02 23:20:13 +02:00
_pickle.c [3.15] gh-150157: Fix critical section for PyDict_Next() in _pickle.c (GH-150158) (#150711) 2026-06-01 14:59:09 +00:00
_posixsubprocess.c [3.15] gh-151403: Fix use-after-free when an argv item's __fspath__ mutates args (GH-151404) (#151445) 2026-06-13 14:32:48 -07:00
_queuemodule.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
_randommodule.c [3.15] gh-149816: Fix a RC in _random.Random.__init__ method (GH-149824) (#149997) 2026-05-18 16:16:55 +00:00
_scproxy.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_ssl.c [3.15] gh-149816: Fix SNI callback callable race (GH-150018) (GH-150099) 2026-06-08 21:01:31 +03:00
_ssl.h GH-103092: isolate _ssl (#104725) 2023-05-22 06:14:48 +05:30
_ssl_data_36.h gh-149254: Update CI to use latest OpenSSL and AWS-LC versions (GH-149330) 2026-05-03 20:20:51 +00:00
_ssl_data_40.h gh-148600: Add Modules/_ssl_data_40.h data (#148601) 2026-04-15 15:59:02 +02:00
_ssl_data_111.h gh-131423: Update OpenSSL data to 3.4.1 on Linux (#131618) 2025-04-25 10:26:58 +02:00
_ssl_data_300.h gh-127330: Update for OpenSSL 3.4 & document+improve the update process (GH-127331) 2024-11-28 13:29:27 +01:00
_ssl_data_340.h gh-131423: Update OpenSSL data to 3.4.1 on Linux (#131618) 2025-04-25 10:26:58 +02:00
_stat.c gh-108765: fix comment about macro definitions in _stat.c post GH-108854 (#136027) 2025-06-27 15:15:11 +00:00
_statisticsmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_struct.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_suggestions.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
_sysconfig.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
_testbuffer.c gh-146151: memoryview supports 'F' and 'D' format types (complex) (#146241) 2026-03-26 15:26:34 +01:00
_testcapi_feature_macros.inc gh-91325: Skip Stable ABI checks with Py_TRACE_REFS special build (GH-92046) 2024-01-29 16:45:31 +01:00
_testcapimodule.c [3.15] gh-151929: Get uptime on BSD/macOS in pythoninfo (GH-152189) (#152196) 2026-06-25 13:41:18 +00:00
_testclinic.c gh-144545: Improve handling of default values in Argument Clinic (GH-146016) 2026-03-17 12:16:35 +02:00
_testclinic_limited.c gh-116322: Rename PyModule_ExperimentalSetGIL to PyUnstable_Module_SetGIL (GH-118645) 2024-05-06 18:59:36 +02:00
_testimportmultiple.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_testinternalcapi.c [3.15] gh-151126: Fix missing PyErr_NoMemory in testinternalcapi.c (GH-152177) (#152179) 2026-06-25 13:19:48 +03:00
_testlimitedcapi.c [3.15] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151140) 2026-06-09 11:37:56 +00:00
_testmultiphase.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_testsinglephase.c gh-145921: Add "_DuringGC" functions for tp_traverse (GH-145925) 2026-04-08 09:15:11 +02:00
_threadmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_tkinter.c [3.15] gh-151126: Sets missing exceptions in tkinter and socket modules initializations (GH-152418) (#152420) 2026-06-27 15:28:27 +00:00
_tracemalloc.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
_typesmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
_typingmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
_uuidmodule.c gh-132710: only use stable _uuid.generate_time_safe() to deduce MAC address (#132901) 2025-05-26 10:56:31 +02:00
_weakref.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
_winapi.c [3.15] gh-151929: Get machine ID and uptime on Windows in pythoninfo (#152146) (#152187) 2026-06-25 12:34:16 +00:00
_zoneinfo.c gh-145883: Fix two heap-buffer-overflows in _zoneinfo (#145885) 2026-04-04 13:29:17 +01:00
addrinfo.h gh-114917: add support for AI_NUMERICSERV in getaddrinfo emulation (#114918) 2025-03-18 11:26:51 +01:00
arraymodule.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
atexitmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
binascii.c [3.15] gh-134837: Correct and improve base85 documentation for base64 and binascii modules (GH-145843) (GH-149742) 2026-05-12 20:25:28 +00:00
blake2module.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
cmathmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
config.c.in gh-128384: Use a context variable for warnings.catch_warnings (gh-130010) 2025-04-09 16:18:54 -07:00
errnomodule.c gh-126585: Add EHWPOISON error code (#126586) 2024-12-03 12:45:50 +00:00
faulthandler.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
fcntlmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
gc_weakref.txt GH-135552: Make the GC clear weakrefs later (GH-136189) 2025-08-07 16:32:17 -07:00
gcmodule.c [3.15] gh-148613: Fix race in gc_set_threshold and gc_get_threshold (GH-150356) (#150841) 2026-06-04 12:43:46 +05:30
getaddrinfo.c gh-114917: Fix typo in getaddrinfo emulation (#131413) 2025-03-18 14:31:13 +01:00
getbuildinfo.c gh-100388: Change undefined __DATE__ to the Unix epoch (#100389) 2025-03-03 14:59:46 +01:00
getnameinfo.c Replace K&R function declarations with ANSI declarations (#114818) 2025-03-11 13:06:36 +01:00
getpath.c GH-131296: Avoid invalid signed char comparison in getpath.c assertion (GH-131594) 2025-04-22 14:06:30 +01:00
getpath.py [3.15] gh-151544: Fixes CVE-2026-12003 by removing the fallback to %VPATH%/Modules/Setup.local for discovering sources in getpath.py (GH-151545) 2026-06-17 16:42:35 +01:00
getpath_noop.c bpo-45582: Port getpath[p].c to Python (GH-29041) 2021-12-03 00:08:42 +00:00
grpmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
hashlib.h gh-131876: Revert "gh-131876: extract _hashlib helpers into a separate directory (#136995) (#137307) 2025-08-01 10:45:40 -07:00
hmacmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
itertoolsmodule.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
ld_so_aix.in Issue #10656: Fix out-of-tree building on AIX 2016-11-20 07:56:37 +00:00
main.c GH-145247: Use _PyTuple_FromPair in Modules (part 1) (#148000) 2026-04-02 23:20:13 +02:00
makesetup gh-116943: Ensure makesetup does not choke on missing EOL in Setup.* files (#139100) 2025-09-18 09:25:01 +00:00
makexp_aix bpo-42087: Remove support for AIX 5.3 and below (GH-22830) 2020-11-16 16:16:10 +01:00
mathintegermodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
mathmodule.c [3.15] Correct frexp() docs for zero and non-finite numbers (GH-149753) (GH-150652) 2026-05-31 10:04:18 +00:00
md5module.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
mmapmodule.c [3.15] gh-151021: Fix mmap empty searches past the end (GH-151023) (GH-151041) 2026-06-07 13:27:26 +00:00
overlapped.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
posixmodule.c [3.15] gh-151763: Fix NULL dereference in os._path_normpath() under OOM (GH-151779) (#152096) 2026-06-24 16:25:28 +00:00
posixmodule.h gh-85283: Convert grp extension to the limited C API (#116611) 2024-03-12 00:46:53 +00:00
pwdmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
pyexpat.c [3.15] gh-90949: Fix copy-paste typo in pyexpat capsule API initialization (GH-151147) (#152088) 2026-06-24 14:40:44 +00:00
readline.c [3.15] gh-150372: Add missing null check on completer_word_break_characters in readline.c (GH-150251) (GH-150628) 2026-06-01 10:00:55 +00:00
README
resource.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
rotatingtree.c gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtree.c (#121260) 2024-07-03 13:05:05 +05:30
rotatingtree.h bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
selectmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
Setup [3.15] gh-140550: Update xxlimited with 3.15 limited API (GH-142827) (GH-149785) 2026-05-14 00:00:29 +02:00
Setup.bootstrap.in gh-136421: Load _datetime static types during interpreter initialization (GH-136583) 2025-07-21 13:47:26 -04:00
Setup.stdlib.in [3.15] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151140) 2026-06-09 11:37:56 +00:00
sha1module.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
sha2module.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
sha3module.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
signalmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
socketmodule.c [3.15] gh-151126: Sets missing exceptions in tkinter and socket modules initializations (GH-152418) (#152420) 2026-06-27 15:28:27 +00:00
socketmodule.h gh-86819: Add ISO-TP CAN socket constants (#23794) 2025-09-17 17:18:04 +00:00
symtablemodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
syslogmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
termios.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00
timemodule.c [3.15] gh-149931: Fix memory leaks on failed realloc (GH-149932) (#150439) 2026-05-26 01:04:49 +00:00
tkappinit.c [3.15] gh-150836: Mount embedded Tk ZIP in _tkinter on Windows (GH-151735) 2026-06-19 18:31:12 -05:00
tkinter.h [3.15] gh-150836: Mount embedded Tk ZIP in _tkinter on Windows (GH-151735) 2026-06-19 18:31:12 -05:00
unicodedata.c [3.15] gh-149079: Fix O(n^2) canonical ordering in unicodedata.normalize() (GH-149080) (#150776) 2026-06-02 10:10:04 +00:00
unicodedata_db.h gh-66802: Add unicodedata.block() function (#145042) 2026-02-21 18:27:55 +01:00
unicodename_db.h gh-144882: Optimize name tables in unicodedata by excluding names derived by rule NR2 (GH-144883) 2026-02-18 12:58:21 +02:00
winreparse.h bpo-31512: Add non-elevated symlink support for Windows (GH-3652) 2019-04-09 11:19:46 -07:00
xxlimited.c [3.15] gh-140550: Update xxlimited with 3.15 limited API (GH-142827) (GH-149785) 2026-05-14 00:00:29 +02:00
xxlimited_3_13.c [3.15] gh-140550: Update xxlimited with 3.15 limited API (GH-142827) (GH-149785) 2026-05-14 00:00:29 +02:00
xxlimited_35.c [3.15] gh-140550: Update xxlimited with 3.15 limited API (GH-142827) (GH-149785) 2026-05-14 00:00:29 +02:00
xxmodule.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
xxsubtype.c gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
zlibmodule.c [3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) 2026-05-24 22:31:19 +03:00

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