You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/18 10:01:44 UTC

[GitHub] [arrow] bogdanghit commented on pull request #9187: ARROW-11223: [Java] Fix: BaseVariableWidthVector/BaseLargeVariableWidthVector setNull and getBufferSizeFor is buggy, may get error java.lang.IndexOutOfBoundsException: index: 15880, length: 4 (expected: range(0, 15880))

bogdanghit commented on pull request #9187:
URL: https://github.com/apache/arrow/pull/9187#issuecomment-762134794


   To be specific, the issue is caused by the different allocated size of a validity buffer which is N/8 from the offset buffer (N+1)*OFFSET_WIDTH. When the ration of null versus non-null values is large and the offset buffer gets filled up before the validity buffer, the `getBufferSizeFor` call will trigger the overflow error.  It is quite easy to reproduce.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org