cpython/Objects
Miss Islington (bot) 86795c8c58
[3.14] gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804) (#159977)
gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804)

_PyTuple_Resize() did not validate newsize for non-empty tuples.

Raise SystemError for a negative size and MemoryError for a too-large size,
like PyTuple_New() already does for the empty-tuple path.
(cherry picked from commit c3608845b6)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2026-10-21 00:24:54 +00:00
..
clinic [3.14] gh-155952: Fix <unrepresentable> Argument Clinic defaults in several signatures (#156172) 2026-08-21 13:23:30 +01:00
mimalloc [3.14] gh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066) (GH-151384) 2026-06-11 22:38:03 +00:00
stringlib [3.14] gh-158803: Fix crash in bytes.join() on a concurrently mutated list (#159031) 2026-10-09 11:43:05 +02:00
abstract.c gh-131238: Remove includes from pycore_interp.h (#131495) 2025-03-20 11:35:23 +00:00
boolobject.c gh-111178: remove redundant casts for functions with correct signatures (#131673) 2025-04-01 17:18:11 +02:00
bytearrayobject.c [3.14] gh-153578: Fix out-of-bounds write in bytearray.extend() with a reentrant __buffer__ (GH-153579) (GH-156008) 2026-08-18 12:59:14 +00:00
bytes_methods.c [3.14] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466) 2026-05-26 10:05:49 +00:00
bytesobject.c [3.14] gh-159739: Reject the minimum dynamic formatting width (GH-159780) (#159931) 2026-10-20 19:28:30 +00:00
call.c [3.14] gh-145779: Improve classmethod/staticmethod scaling in free-threaded build (gh-145826) (#146088) 2026-03-19 10:49:12 -04:00
capsule.c
cellobject.c [3.14] Fix a stray newline in the cell type docstring (GH-157240) (#157276) 2026-09-10 16:24:12 +00:00
classobject.c [3.14] gh-145779: Improve classmethod/staticmethod scaling in free-threaded build (gh-145826) (#146088) 2026-03-19 10:49:12 -04:00
codeobject.c [3.14] gh-151763: Fix possible crash on CodeType deallocation (GH-152034) (#152070) 2026-06-24 12:11:44 +00:00
complexobject.c [3.14] gh-155526: Don't check errno in abs(complex) (GH-155527) (GH-157341) (#157555) 2026-09-15 14:13:26 +00:00
descrobject.c [3.14] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150813) 2026-06-02 22:22:46 +00:00
dictnotes.txt
dictobject.c [3.14] gh-158254: Detect keys changing during reverse dict iteration (GH-158255) (GH-158268) 2026-09-27 03:21:33 +00:00
enumobject.c [3.14] gh-153932: protect read of en_index during enumerate.reduce (GH-154118) (GH-154129) 2026-07-19 17:01:07 +02:00
exceptions.c [3.14] GH-146096: Fix segfault in BaseExceptionGroup repr (GH-146141) (GH-156904) 2026-09-04 11:24:59 +02:00
fileobject.c gh-111178: fix UBSan failures for PyStdPrinter_Object (#131607) 2025-03-24 10:57:14 +01:00
floatobject.c [3.14] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466) 2026-05-26 10:05:49 +00:00
frameobject.c [3.14] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778) (GH-156011) 2026-08-18 13:09:24 +00:00
funcobject.c [3.14] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778) (GH-156011) 2026-08-18 13:09:24 +00:00
genericaliasobject.c [3.14] gh-155752: Do not crash when GenericAlias parameters change during substitution (GH-155761) (#155771) 2026-09-07 22:01:02 -04:00
genobject.c [3.14] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150813) 2026-06-02 22:22:46 +00:00
interpolationobject.c [3.14] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150813) 2026-06-02 22:22:46 +00:00
iterobject.c gh-131666: mark anext_awaitable.close as a METH_NOARGS instead of METH_VARARGS (#131671) 2025-03-25 09:03:22 +05:30
listobject.c [3.14] gh-158592: Skip reallocation when shrinking a small list (GH-158787) (gh-159002) 2026-10-09 05:42:32 +09:00
listsort.txt
lnotab_notes.txt
longobject.c [3.14] gh-157710: Add MemoryError tests to PyUnicodeWriter (#159557) 2026-10-16 20:26:49 +02:00
memoryobject.c [3.14] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150813) 2026-06-02 22:22:46 +00:00
methodobject.c [3.14] gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (#136119) 2025-06-30 15:59:22 +02:00
moduleobject.c [3.14] gh-159739: Handle module filename encoding errors (GH-159749) (#159842) 2026-10-20 11:12:02 -07:00
namespaceobject.c [3.14] gh-143636: fix a crash when calling `__replace__ on invalid SimpleNamespace` instances (GH-143655) (#145938) 2026-03-14 10:35:41 +00:00
object.c [3.14] gh-157242: Fix set_nomemory() on Py_TRACE_REFS build (#157351) (#159528) 2026-10-16 15:40:58 +02:00
object_layout.md
object_layout_312.gv
object_layout_312.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
object_layout_313.gv
object_layout_313.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
object_layout_full_312.gv
object_layout_full_312.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
object_layout_full_313.gv
object_layout_full_313.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
obmalloc.c [3.14] gh-145615: Fix mimalloc page leak in the free-threaded build (gh-145626) (#145691) 2026-03-09 14:17:57 -04:00
odictobject.c [3.14] gh-159739: Handle OrderedDict item iterator allocation failures (GH-159774) (#159930) 2026-10-20 19:21:37 +00:00
picklebufobject.c [3.14] gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (#136119) 2025-06-30 15:59:22 +02:00
rangeobject.c [3.14] GH-141312: Allow only integers to longrangeiter_setstate state (GH-141317) (GH-141559) 2025-11-15 21:30:25 +02:00
README
setobject.c [3.14] gh-152235: Defer GC tracking in set.union and set.difference (gh-152290) (gh-152312) 2026-06-26 17:38:10 +00:00
sliceobject.c [3.14] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466) 2026-05-26 10:05:49 +00:00
structseq.c [3.14] gh-145376: Fix GC tracking in structseq.__replace__ (GH-145820) (#145922) 2026-03-16 14:38:15 +05:30
templateobject.c [3.14] gh-159739: Initialize template iterator references before allocating (GH-159773) (#159901) 2026-10-20 11:13:33 -07:00
tupleobject.c [3.14] gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804) (#159977) 2026-10-21 00:24:54 +00:00
typeobject.c [3.14] gh-149816: Fix race in subtype_getweakref in free-threading build (gh-150247) (gh-159363) 2026-10-13 11:34:43 -07:00
typeslots.inc Revert "gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays (#133396)" (#133498) 2025-05-06 13:12:26 +03:00
typeslots.py
typevarobject.c [3.14] gh-159739: [typing] Handle generic alias construction errors (GH-159772) (#159929) 2026-10-20 19:22:00 +00:00
unicodectype.c gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130118) 2025-02-14 18:16:47 +01:00
unicodeobject.c [3.14] gh-159739: Reject the minimum dynamic formatting width (GH-159780) (#159931) 2026-10-20 19:28:30 +00:00
unicodetype_db.h
unionobject.c [3.14] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150813) 2026-06-02 22:22:46 +00:00
weakrefobject.c [3.14] gh-159430: Add _PyObject_LookupSpecial error checks in bytes/weakref (GH-159432) (GH-159473) 2026-10-16 13:19:56 +02:00

Source files for various builtin objects