Skip to content
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

[3.10] bpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for large files (GH-25058) #26190

Merged
merged 1 commit into from
May 17, 2021

Commits on May 17, 2021

  1. bpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for …

    …large files (pythonGH-25058)
    
    `shutil.unpack_archive()` tries to read the whole file into memory, making no use of any kind of smaller buffer. Process crashes for really large files: I.e. archive: ~1.7G, unpacked: ~10G. Before the crash it can easily take away all available RAM on smaller systems. Had to pull the code form `zipfile.Zipfile.extractall()` to fix this
    
    Automerge-Triggered-By: GH:gpshead
    (cherry picked from commit f32c795)
    
    Co-authored-by: Igor Bolshakov <ibolsch@gmail.com>
    igorvoltaic authored and miss-islington committed May 17, 2021
    Configuration menu
    Copy the full SHA
    cb583ed View commit details
    Browse the repository at this point in the history