cpython/Objects
Miss Islington (bot) 8160453a18
[3.15] gh-158928: Fix overflow in bytearray.__init__ from an iterator (GH-158947) (#161448)
Passing an iterator to `bytearray.__init__` didn't take into account
that iterating that iterator could modify the bytearray position and
`ob_start`. When that happened the iterator would write beyond the end
of the allocation.

Update the "enough space" check to account for `ob_start`. The
assignment always included it. Add an assert after append that the
offsets line up as expected.
(cherry picked from commit 25181cee14)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-05 14:14:18 -08:00
..
clinic
mimalloc [3.15] gh-160588: Restore the gh-123022 check in the vendored mimalloc (GH-160589) (#160611) 2026-10-24 18:20:18 +00:00
stringlib
abstract.c
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-158928: Fix overflow in bytearray.__init__ from an iterator (GH-158947) (#161448) 2026-11-05 14:14:18 -08: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
capsule.c
cellobject.c
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-159184: Do not intern NaN constants on the free-threaded build (GH-161276) (#161287) 2026-11-05 14:04:36 -08: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
dictnotes.txt
dictobject.c [3.15] gh-160496: Clear inline values with atomic release stores (GH-160510) (#160710) 2026-10-26 14:50:22 +00: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-160773: Fix use-after-free in OSError.__str__ (GH-160822) (#160884) 2026-10-29 11:59:21 +00: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
funcobject.c [3.15] gh-159136: Avoid stop-the-world when setting function name attributes (gh-159269) (gh-159725) 2026-10-29 15:17:50 -07:00
genericaliasobject.c
genobject.c [3.15] gh-159136: Avoid stop-the-world when setting function name attributes (gh-159269) (gh-159725) 2026-10-29 15:17:50 -07:00
interpolationobject.c
iterobject.c
lazyimportobject.c
listobject.c [3.15] gh-159739: Protect list storage while reporting its size (GH-160196) (#160363) 2026-10-22 23:59:28 +00:00
listsort.txt
longobject.c
memoryobject.c gh-149402: Don't assume single-character type codes (struct/array/ctypes) (GH-149483) 2026-11-04 12:11:08 +09: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
object_layout.md
object_layout_312.gv
object_layout_312.png
object_layout_313.gv
object_layout_313.png
object_layout_full_312.gv
object_layout_full_312.png
object_layout_full_313.gv
object_layout_full_313.png
obmalloc.c [3.15] gh-159111: Update vendored mimalloc to v2.5.2 (gh-159112) (gh-160178) 2026-10-22 09:55:05 -07:00
odictobject.c
picklebufobject.c
rangeobject.c gh-129068: Make range iterators thread-safe (gh-142886) 2025-12-18 13:11:51 -05:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
sentinelobject.c
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-154318: Guard C recursion when hashing nested tuples and frozendicts (GH-154362) (#160128) 2026-10-21 22:52:18 +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: Release replaced type alias values (GH-160167) (#160242) 2026-10-22 14:45:39 +00:00
unicode_format.c
unicode_formatter.c
unicode_writer.c
unicodectype.c
unicodeobject.c
unicodetype_db.h
unionobject.c
weakrefobject.c

Source files for various builtin objects