]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-106287: Do not write objects after an unmarshalling error (GH-132715) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 14 Jan 2026 11:52:20 +0000 (12:52 +0100)
committerGitHub <noreply@github.com>
Wed, 14 Jan 2026 11:52:20 +0000 (11:52 +0000)
commitae5760527a57165573b305b52d2fa6d2528aab0c
tree96663572e66314733dcfff46459f6ef72e5e2f73
parenta36ba5aee3ea171f54c1f12887c9c5c55b1f894b
[3.14] gh-106287: Do not write objects after an unmarshalling error (GH-132715) (GH-143832)

Writing out an object may involve a slot lookup, which is not safe to do with
an exception raised. In debug mode an assertion failure will occur if this
happens.
(cherry picked from commit ce8f5f98c6fc95a1704360d986a4d0281eeada79)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
Lib/test/test_marshal.py
Misc/NEWS.d/next/Library/2025-04-19-17-34-11.gh-issue-132715.XXl47F.rst [new file with mode: 0644]
Python/marshal.c