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

Bug fixes to avoid overflow problems #142

Merged
merged 1 commit into from
Jan 27, 2022
Merged

Bug fixes to avoid overflow problems #142

merged 1 commit into from
Jan 27, 2022

Conversation

AlyHdr
Copy link

@AlyHdr AlyHdr commented Jan 14, 2022

We are adding some bug fixes to use longs and SeqLog64Big in order to avoid overflow problems when dealing with very large files where integers don't suffice anymore.

There is a as well some edge cases when a section is empty and using PFCSectionDictionaryBig class, it throws an exception so we handle this as well.

Some casts to int in resize methods as well are changed to just use long instead to avoid IndexOutOfBoundException when we have an overflow and get a negative value when the arrays are so big.

@mielvds mielvds added this to the 2.1.3 milestone Jan 14, 2022
@mielvds mielvds self-requested a review January 14, 2022 16:12
@mielvds
Copy link
Member

mielvds commented Jan 14, 2022

Thanks @AlyHdr . I'll free up some time to review. First question: do we still need the non-Big implementations of PFCSectionDictionary, SeqLog64, etc?

@AlyHdr
Copy link
Author

AlyHdr commented Jan 14, 2022

Yes I think it would be better to keep this in the code base because someone might be using those somewhere, and it still used in some places in the code.

@mielvds
Copy link
Member

mielvds commented Jan 14, 2022

Good point! But for the code itself, we could probably replace them right?

@AlyHdr
Copy link
Author

AlyHdr commented Jan 14, 2022

Hmm in theory yes but it should be tested that everything is working properly...

@mielvds mielvds merged commit 0b2fe91 into rdfhdt:3.0.0 Jan 27, 2022
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