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 IndexOutOfBound for loaded HDT BigByteBuffer of size > 2^31 #161

Merged
merged 2 commits into from
May 10, 2022

Conversation

ate47
Copy link
Contributor

@ate47 ate47 commented May 10, 2022

In the pull request #104, I forgot to cast to long a value, it was throwing an exception for big enough hdt, example:

java.lang.ArrayIndexOutOfBoundsException: Index 74 out of bounds for length 74
        at org.rdfhdt.hdt.util.string.ByteStringUtil.strcmp(ByteStringUtil.java:193) ~[hdt-java-core-3.0.2.jar!/:na]
        at org.rdfhdt.hdt.dictionary.impl.section.PFCDictionarySectionBig.locateBlock(PFCDictionarySectionBig.java:242) ~[hdt-java-core-3.0.2.jar!/:na]
        at org.rdfhdt.hdt.dictionary.impl.section.PFCDictionarySectionBig.locate(PFCDictionarySectionBig.java:263) ~[hdt-java-core-3.0.2.jar!/:na]
        at org.rdfhdt.hdt.dictionary.impl.BaseDictionary.stringToId(BaseDictionary.java:136) ~[hdt-java-core-3.0.2.jar!/:na]

This pull request contains the fix for this error.

@D063520
Copy link
Contributor

D063520 commented May 10, 2022

top!

@D063520 D063520 merged commit 931533b into rdfhdt:master May 10, 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