cpython/Objects
Miss Islington (bot) f97464b3da
[3.15] gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804) (#159976)
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:15:53 +00:00
..
clinic [3.15] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778) (GH-156010) 2026-10-09 20:54:35 +03:00
mimalloc [3.15] gh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066) (GH-151383) 2026-06-11 22:39:37 +00:00
stringlib [3.15] gh-158803: Fix crash in bytes.join() on a concurrently mutated list (#159030) 2026-10-10 13:49:28 +02:00
abstract.c [3.15] gh-141510 Add frozendict fast paths to abstract.c (GH-150692) (#151704) 2026-06-19 09:08:08 +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.15] gh-157242: Leave bytearray unchanged if resize() fails (#157340) (#159274) 2026-10-13 08:15:21 +02:00
bytes_methods.c [3.15] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150336) 2026-05-24 16:24:57 +03:00
bytesobject.c [3.15] gh-159739: Reject the minimum dynamic formatting width (GH-159780) (#159906) 2026-10-20 14:57:25 -07:00
call.c gh-145779: Improve classmethod/staticmethod scaling in free-threaded build (#145826) 2026-03-17 14:24:44 -04:00
capsule.c gh-111178: fix UBSan failures in Objects/capsule.c (GH-128239) 2025-01-08 14:55:04 +01:00
cellobject.c [3.15] Fix a stray newline in the cell type docstring (GH-157240) (#157278) 2026-09-10 16:28:54 +00:00
classobject.c gh-145779: Improve classmethod/staticmethod scaling in free-threaded build (#145826) 2026-03-17 14:24:44 -04:00
codeobject.c [3.15] gh-155363: Fix QSBR slot leak on thread state creation failure (gh-155365) (#155579) 2026-08-22 12:39:14 +03:00
complexobject.c [3.15] gh-155526: Don't check errno in abs(complex) (GH-155527) (#157341) 2026-09-15 16:45:12 +03:00
descrobject.c [3.15] gh-152405: Do not expose the internal mapping when rich-comparing MappingProxyType objects (GH-152483) (#153670) 2026-07-13 19:42:00 +00:00
dictnotes.txt
dictobject.c [3.15] gh-158197: Fix split dict iteration during concurrent deletion (gh-158686) (#159953) 2026-10-20 17:03:22 -07:00
enumobject.c [3.15] gh-153932: protect read of en_index during enumerate.reduce (GH-154118) (GH-154128) 2026-07-19 17:01:00 +02:00
exceptions.c [3.15] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778) (GH-156010) 2026-10-09 20:54:35 +03:00
fileobject.c gh-130821: Add type information to error messages for invalid return type (GH-130835) 2025-08-14 11:04:41 +03:00
floatobject.c [3.15] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150336) 2026-05-24 16:24:57 +03:00
frameobject.c [3.15] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778) (GH-156010) 2026-10-09 20:54:35 +03:00
funcobject.c [3.15] gh-113318: Fix @getter and @setter in Argument Clinic (GH-155778) (GH-156010) 2026-10-09 20:54:35 +03:00
genericaliasobject.c [3.15] gh-159739: [typing] Handle generic alias construction errors (GH-159772) (#159909) 2026-10-20 18:43:59 +00:00
genobject.c [3.15] gh-151436: Fix missing tstate->last_profiled_frame updates (GH-151437) (#151612) 2026-06-19 10:24:53 +02:00
interpolationobject.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
iterobject.c gh-130821: Add type information to error messages for invalid return type (GH-130835) 2025-08-14 11:04:41 +03:00
lazyimportobject.c [3.15] gh-159288: Avoid segfault by adding missing recursion checks when walking lazy import chains (GH-159289) (#159416) 2026-10-14 16:46:25 +02:00
listobject.c [3.15] gh-158592: Skip reallocation when shrinking a small list (GH-158787) (gh-159001) 2026-10-10 09:32:10 +09:00
listsort.txt gh-135551: Change how sorting picks minimum run length (#135553) 2025-06-26 23:48:05 -05:00
longobject.c [3.15] gh-157710: Add MemoryError tests to PyUnicodeWriter (#159548) 2026-10-16 16:18:33 +00:00
memoryobject.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
methodobject.c gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) 2025-06-30 11:14:31 +00:00
moduleobject.c [3.15] gh-159739: Handle module filename encoding errors (GH-159749) (#159841) 2026-10-20 11:11:50 -07:00
namespaceobject.c gh-143636: fix a crash when calling `__replace__ on invalid SimpleNamespace` instances (#143655) 2026-03-14 09:58:15 +00:00
object.c [3.15] gh-157242: Fix set_nomemory() on Py_TRACE_REFS build (#157351) (#159292) 2026-10-13 06:55:31 +00:00
object_layout.md GH-115776: Allow any fixed sized object to have inline values (GH-123192) 2024-08-21 15:52:04 +01:00
object_layout_312.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_312.png gh-71648: Optimize PNG files (GH-138842) 2025-09-12 20:13:05 +00:00
object_layout_313.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_313.png gh-71648: Optimize PNG files (GH-138842) 2025-09-12 20:13:05 +00:00
object_layout_full_312.gv
object_layout_full_312.png gh-71648: Optimize PNG files (GH-138842) 2025-09-12 20:13:05 +00:00
object_layout_full_313.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_full_313.png gh-71648: Optimize PNG files (GH-138842) 2025-09-12 20:13:05 +00:00
obmalloc.c [3.15] gh-151297: Fix undefined behavior in _PyObject_MiRealloc (GH-151358) (GH-151388) 2026-06-12 01:47:01 +00:00
odictobject.c [3.15] gh-159739: Handle OrderedDict item iterator allocation failures (GH-159774) (#159915) 2026-10-20 18:32:19 +00:00
picklebufobject.c gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) 2025-06-30 11:14:31 +00:00
rangeobject.c gh-129068: Make range iterators thread-safe (gh-142886) 2025-12-18 13:11:51 -05:00
README
sentinelobject.c [3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092) 2026-05-22 07:44:34 -07:00
setobject.c [3.15] gh-152235: Defer GC tracking in set.union and set.difference (gh-152290) (gh-152316) 2026-06-26 17:54:25 +00:00
sliceobject.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
structseq.c gh-148119: Refactor get_type_attr_as_size to improve error handling in structseq.c (#148120) 2026-04-06 17:41:30 +05:30
templateobject.c [3.15] gh-159739: Initialize template iterator references before allocating (GH-159773) (#159900) 2026-10-20 18:16:24 +00:00
tupleobject.c [3.15] gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804) (#159976) 2026-10-21 00:15:53 +00:00
typeobject.c [3.15] gh-149816: Fix race in subtype_getweakref in free-threading build (gh-150247) (gh-159364) 2026-10-13 16:03:20 -07:00
typevarobject.c [3.15] gh-159739: [typing] Handle generic alias construction errors (GH-159772) (#159909) 2026-10-20 18:43:59 +00:00
unicode_format.c [3.15] gh-159739: Reject the minimum dynamic formatting width (GH-159780) (#159906) 2026-10-20 14:57:25 -07:00
unicode_formatter.c [3.15] gh-159739: Check character formatting allocation failure (GH-159746) (#159839) 2026-10-20 11:11:44 -07:00
unicode_writer.c [3.15] gh-158451: Add _PyUnicodeWriter_WriteLatin1String() test (#158464) (#159551) 2026-10-16 20:28:34 +02:00
unicodectype.c gh-129117: Add unicodedata.isxidstart() function (#140269) 2025-10-30 10:18:12 +00:00
unicodeobject.c [3.15] gh-157710: Add MemoryError tests to PyUnicodeWriter (#159548) 2026-10-16 16:18:33 +00:00
unicodetype_db.h closes gh-138706: update Unicode to 17.0.0 (#138719) 2025-09-11 09:58:39 -07:00
unionobject.c [3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808) 2026-06-02 20:40:52 +00:00
weakrefobject.c [3.15] gh-159430: Add _PyObject_LookupSpecial error checks in bytes/weakref (GH-159432) (GH-159474) 2026-10-16 13:19:45 +02:00

Source files for various builtin objects