Skip to content

[3.14] gh-154848: Enforce frame boundaries in the C unpickler (GH-154893) - #154981

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
serhiy-storchaka:backport-10a8454-3.14
Jul 31, 2026
Merged

[3.14] gh-154848: Enforce frame boundaries in the C unpickler (GH-154893)#154981
serhiy-storchaka merged 1 commit into
python:3.14from
serhiy-storchaka:backport-10a8454-3.14

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Manual backport of GH-154893 (had merge conflicts due to unrelated refactors on main); verified with a local build and the pickle test suites.

…ythonGH-154893)

The C unpickler did not enforce PEP 3154 frame boundaries: an argument could
straddle a frame, and a new frame could begin before the previous one ended.
Such reads now raise UnpicklingError, as in the pure Python implementation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 10a8454)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
serhiy-storchaka merged commit 0248ea9 into python:3.14 Jul 31, 2026
87 of 90 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the backport-10a8454-3.14 branch July 31, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant