You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the help of @MonicaLemay@romayalon we saw that running with hashCheck=true fails with ArrayIndexOutOfBoundsException when the total stream size exceeds 2 GB.
I found the problem in RandomInputStream (which is pretty old code) - casting the gap variable to int overflows in those cases. I tested that simply defining gap as long and then casting it to int only in the end when it is used for arraycopy seems to fix this issue.
Hi
This problem was found while debugging this issue noobaa/noobaa-core#6934.
With the help of @MonicaLemay @romayalon we saw that running with
hashCheck=true
fails withArrayIndexOutOfBoundsException
when the total stream size exceeds 2 GB.I found the problem in
RandomInputStream
(which is pretty old code) - casting thegap
variable to int overflows in those cases. I tested that simply defininggap
as long and then casting it to int only in the end when it is used for arraycopy seems to fix this issue.Here is my standalone reproduction code:
The (abbreviated) output is:
The text was updated successfully, but these errors were encountered: