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 intermediate integer overflow when reading/writing large files #224

Merged
merged 2 commits into from
May 9, 2024

Conversation

TRPrasanna
Copy link
Contributor

fixed issue with intermediate integer overflow when writing files exceeding 2 GB

see here : #223

fixed issue with intermediate integer overflow when writing files exceeding 2 GB
@TRPrasanna TRPrasanna changed the title Update HexMesh.f90 Fix intermediate integer overflow when writing large files Apr 30, 2024
@loganoz loganoz requested a review from oscarmarino May 3, 2024 06:59
@loganoz loganoz assigned Dhueper and unassigned Dhueper May 3, 2024
@loganoz loganoz requested a review from Dhueper May 3, 2024 07:00
multiplied 1_AddrInt to wherever variable offsetIO is used
@TRPrasanna
Copy link
Contributor Author

TRPrasanna commented May 3, 2024

I just realized that overflow can happen at more places, basically wherever the variable offsetIO is multiplied by other integers. So I multiplied these terms with 1_AddrInt wherever this variable exists on the right hand side of any relevant expression, so that the product is promoted to type AddrInt. These were only in 2 more lines (line 3081 and 3377, in addition to the first commit for line 2981).

@TRPrasanna TRPrasanna changed the title Fix intermediate integer overflow when writing large files Fix intermediate integer overflow when reading/writing large files May 4, 2024
Copy link
Collaborator

@oscarmarino oscarmarino left a comment

Choose a reason for hiding this comment

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

Looks good, I will try to see if it works now on big files

@oscarmarino oscarmarino merged commit 5bce14a into loganoz:master May 9, 2024
18 of 20 checks passed
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.

3 participants