This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: marshal: error cases are not documented
Type: Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, pitrou, python-dev, vstinner
Priority: normal Keywords:

Created on 2013-10-29 00:41 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg201595 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-29 00:41
Since changeset 4059e871e74e (issue #19219), it becomes more clear in the source code that reading data from marshal can fail. It was already true in Python 3.3, but less explicit.

Failures are not documented in Doc/c-api/marshal.rst.

Failures are not tested in zipimport.c, maybe also in other files.
msg201597 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-29 00:47
New changeset 11958c69a4b2 by Victor Stinner in branch 'default':
Issue #19428: zipimport now handles errors when reading truncated or invalid
http://hg.python.org/cpython/rev/11958c69a4b2
msg201608 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-10-29 07:00
Is this backportable?
msg238424 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-03-18 12:59
New changeset 1e4605542ac4 by Victor Stinner in branch 'default':
Issue #19428: Handle PyMarshal_Read*() errors in run_pyc_file()
https://hg.python.org/cpython/rev/1e4605542ac4

New changeset acb4d43955f6 by Victor Stinner in branch '3.4':
Issue #19428: Document that PyMarshal_ReadLongFromFile() and
https://hg.python.org/cpython/rev/acb4d43955f6
History
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63627
2015-03-18 12:59:21vstinnersetstatus: open -> closed
resolution: fixed
2015-03-18 12:59:13python-devsetmessages: + msg238424
2013-10-29 07:00:28georg.brandlsetnosy: + georg.brandl
messages: + msg201608
2013-10-29 00:47:03python-devsetnosy: + python-dev
messages: + msg201597
2013-10-29 00:41:28vstinnercreate