Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve error handling when read marshal data #101006

Closed
Labels
3.10only security fixes3.11only security fixes3.12only security fixestype-featureA feature request or enhancement
@serhiy-storchaka

Description

@serhiy-storchaka

There are several issues in error handling in the marshal module:

  1. EOFError can override other errors such as MemoryError or OSError at the start of the object.
  2. When the NULL object occurs as a code object component, the error message can be misleading (like "NULL object in marshal data for list") or even ignored (if the code object is a dict key) and reading will continue.

Also, it is a common idiom to only call PyErr_Occurred() if the return code denotes a possible error. This is not always used in that code. While the performance gain may be tiny, it is better to get rid of an overhead, it can pay for itself after further optimizations.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixestype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp