GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — zipimport.zipimporter breaks for zips containing files with size > 0xFFFFFFFF · Issue #118107 · python/cpython

zipimport.zipimporter breaks for zips containing files with size > 0xFFFFFFFF #118107

New issue
Copy link
New issue
Copy link
Closed
Closed
zipimport.zipimporter breaks for zips containing files with size > 0xFFFFFFFF#118107
Copy link
Labels
3.13only security fixesonly security fixesrelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@jsirois
jsirois
opened on Apr 19, 2024
Issue body actions

Bug report

Bug description:

The following test in the Pex project fails under CPython 3.13.0a6:
https://github.com/pex-tool/pex/blob/27c2db2bf26039bef41323c964bc4e0317a7b4f5/tests/test_pex_builder.py#L520-L547

The failure includes stderr output from zipimporter like:

Failed checking if argv[0] is an import path entry
Traceback (most recent call last):
  File "<frozen zipimport>", line 98, in __init__
  File "<frozen zipimport>", line 520, in _read_directory
NameError: name 'struct' is not defined. Did you forget to import 'struct'?
  File "/tmp/pytest-of-jsirois/pytest-14/test_check0/too-big.pyz", line 1
    PK-
SyntaxError: source code cannot contain null bytes

Inspection of #94146 indicates the code added to handle too large files is missing an import: https://github.com/python/cpython/pull/94146/files#r1572552939 The tests added in that PR do stress too many files for a 32 bit zip, but they do not stress too big a file for a 32 bit zip; so it makes sense that this import omission slipped past.

CPython versions tested on:

3.13, CPython main branch

Operating systems tested on:

Linux

Linked PRs

  • gh-118107: Fix zipimporter ZIP64 handling. #118108

Activity

  1. jsirois
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Apr 19, 2024
  2. facebook-github-bot
    added a commit that references this issue on Apr 19, 2024

    Fix missing import in zipimport

    a4b51a0
  3. gpshead
    added
    3.13only security fixesonly security fixes
    on Apr 22, 2024
  4. encukou commented on May 3, 2024

    @encukou
    encukou
    on May 3, 2024
    Member
    More actions

    Marking as potential release blocker.

    Reacted by Itamar Oren
  5. encukou
    added
    release-blocker
    on May 3, 2024
  6. ezio-melotti
    added this to Release and Deferred blockers 🚫on May 3, 2024
  7. github-project-automation
    moved this to Todo in Release and Deferred blockers 🚫on May 3, 2024
  8. gpshead
    added a commit that references this issue on May 4, 2024

    pythongh-118107: Fix zipimporter ZIP64 handling.

    702ece5
  9. encukou
    added a commit that references this issue on May 7, 2024

    gh-118107: Fix zipimporter ZIP64 handling. (GH-118108)

    49258ef
  10. encukou commented on May 7, 2024

    @encukou
    encukou
    on May 7, 2024
    Member
    More actions

    Thank you for the report and fix!

  11. encukou
    closed this as completedon May 7, 2024
  12. github-project-automation
    moved this from Todo to Done in Release and Deferred blockers 🚫on May 7, 2024
  13. SonicField
    added a commit that references this issue on May 8, 2024

    pythongh-118107: Fix zipimporter ZIP64 handling. (pythonGH-118108)

    1539e02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixesonly security fixesrelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Release and Deferred blockers 🚫
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.