Closed LakshSingla closed 3 months ago
Thank you for finding and reporting this.
That looks like a bug. I'm going to investigate to see if this appears anywhere else.
This fix along with a few other minor issues is now in master and in process for a bug-fix release 2.2.1
Memory.java#L198, permalink seems incorrect. It initializes the memory with the offset 0, instead of the supplied offset into the array. I might be unclear on the method's contract, but this seems counterintuitive to what I was expecting - an offset of x with length l as an argument means that the memory would be a window into the [x..x+l] bytes of the provided byte array. This is what ByteBuffer.wrap() does.
Is this the expected behavior of the method or is it a bug?
Thanks!