]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] 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:48:52 +0000 (12:48 +0100)
committerGitHub <noreply@github.com>
Wed, 14 Jan 2026 11:48:52 +0000 (11:48 +0000)
commit8c6d87693b87672eaef359dc53e01e8918d484c6
tree7856dd0d01655630693d27608108fcfb2699cc9f
parent5f7a49a77b8ade550b23f4395f1c71b012d58de1
[3.13] gh-106287: Do not write objects after an unmarshalling error (GH-132715) (GH-143833)

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