The ByteBuffer get methods use a java comparison between the offset and the upper bound. This is a signed comparison and doesn't work if we have mapped the ByteBuffer onto a 64-bit memory space like on AMD64. A special unsigned comparison routine is required. In Java, this could be: boolean uLongLessThan (a, b) { if (a >=0 && b >= 0 || a < 0 && b < 0) return a < b; else return b < 0; } Alternatively, the comparison could be pushed down to cni code and done in C where unsigned comparisons can be made.
Hi, Tim, Since you are working on this issue, I add you in the cc list. Any help on ppc64 side, let me know. Thanks!
Fixed with inua/eio/ByteBuffer.java 1.4
*** Bug 3388 has been marked as a duplicate of this bug. ***