Skip to content

gh-101006: Improve error handling when read marshal data #101007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 13, 2023

  • EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object.
  • Raise more relevant error when the NULL object occurs as a code object component.
  • Minimize an overhead of calling PyErr_Occurred().

* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a quick review, this looks good to me. I'd like to take a closer look if you can wait for a day or two.

serhiy-storchaka and others added 2 commits May 21, 2023 23:23
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.12 only security fixes label Jun 29, 2023
@serhiy-storchaka serhiy-storchaka merged commit 8bf6904 into python:main Jun 29, 2023
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the marshal-load-error-handling branch June 29, 2023 09:22
@bedevere-bot
Copy link

GH-106226 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jun 29, 2023
@bedevere-bot
Copy link

GH-106227 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 29, 2023
…nGH-101007)

* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jun 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 29, 2023
…nGH-101007)

* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jun 29, 2023
…01007) (GH-106226)

* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jun 29, 2023
…01007) (GH-106227)

* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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.

6 participants