Skip to content

Commit

Permalink
[GR-61620] Capacity of UnsafeWasmMemory.asByteBuffer not equal to len…
Browse files Browse the repository at this point in the history
…gth of memory.

PullRequest: graal/19908
  • Loading branch information
jirkamarsik committed Jan 26, 2025
2 parents 1c6d168 + 8e5a3e1 commit b035c61
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ public void close() {
@ExportMessage
@TruffleBoundary
public ByteBuffer asByteBuffer() {
return buffer.duplicate();
return buffer.slice(0, Math.toIntExact(byteSize()));
}

private boolean outOfBounds(int offset, int length) {
Expand Down

0 comments on commit b035c61

Please sign in to comment.