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

Fix bug where a large file (>1GiB) would cause a int overflow #241

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

DavyLandman
Copy link
Member

@DavyLandman DavyLandman commented Feb 13, 2024

The reasons was to avoid large buffers getting allocated for small files, but that hurt big files in the end.

It was only triggered with files bigger than (1<<31)/2. So any file bigger than 1073741824 bytes, or 1024 MiB, aka 1 GiB

The reasons was to avoid large buffers getting allocated for small files, but that hurt big files in the end
@DavyLandman DavyLandman changed the title Fix bug where a large file (>1.2GB) would cause a int overflow Fix bug where a large file (>1GiB) would cause a int overflow Feb 13, 2024
Copy link

Test Results

     96 files  ±0       96 suites  ±0   6m 40s ⏱️ -19s
242 291 tests ±0  242 290 ✅ ±0  1 💤 ±0  0 ❌ ±0 
726 960 runs  ±0  726 957 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit 8e0adb3. ± Comparison against base commit 1f87cfb.

Copy link
Member

@jurgenvinju jurgenvinju left a comment

Choose a reason for hiding this comment

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

nice fix

@jurgenvinju jurgenvinju merged commit dada98d into main Feb 13, 2024
9 checks passed
@jurgenvinju jurgenvinju deleted the fix-large-file-read-error branch February 13, 2024 13:30
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.

2 participants