gh-105979: Fix exception handling in unmarshal_frozen_code (Python/import.c)#105980
gh-105979: Fix exception handling in unmarshal_frozen_code (Python/import.c)#105980kumaraditya303 merged 5 commits intopython:mainfrom chgnrdv:_imp.get_frozen_object-clear-exc-if-unmarshal-fails
unmarshal_frozen_code (Python/import.c)#105980Conversation
Clear exception that is set if function fails to unmarshal given data. It will prevent calling 'PyUnicode_FromFormat' in 'set_frozen_error' with exception set
kumaraditya303
left a comment
There was a problem hiding this comment.
LGTM, please add a short news entry.
Misc/NEWS.d/next/Core and Builtins/2023-06-22-19-16-24.gh-issue-105979.TDP2CU.rst
Outdated
Show resolved
Hide resolved
|
@kumaraditya303, sorry for being late, but I can reproduce the issue on 3.11.4 too. Should these changes be backported then? |
|
Thanks @chgnrdv for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
|
Thanks @chgnrdv for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
|
Sorry @chgnrdv and @kumaraditya303, I had trouble checking out the |
|
Thanks @chgnrdv for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…Python/import.c`) (pythonGH-105980) (cherry picked from commit cd52803) Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
|
Sorry, @chgnrdv and @kumaraditya303, I could not cleanly backport this to |
|
GH-106055 is a backport of this pull request to the 3.12 branch. |
|
GH-106100 is a backport of this pull request to the 3.11 branch. |
Fixes #105979
Clear exception that is set in
PyMarshal_ReadObjectFromStringwhen it fails to unmarshal given data. It will prevent callingPyUnicode_FromFormatinset_frozen_errorwith exception set_imp.get_frozen_objectif data object contains bad marshal data #105979