-
Bug
-
Resolution: Fixed
-
P3
-
None
-
19
1. MemorySegment.get/setUtf8String - Need to mention about -ve offset results in IndexOutOfBoundsException
Ex. 1: MemorySession.global().allocateUtf8String("HelloWordl").setUtf8String(-1, "JavaWorld");
Ex.2: MemorySession.global().allocateUtf8String("HelloWordl").getUtf8String(-1);
2. MemoryAddress.ofLong - Caution to the programmer of VM crash due to unsafe or incorrect usage (like there is for MemoryAddress.get/setUtf8String)
Ex: MemoryAddress.ofLong(Long.MAX_VALUE).getUtf8String(0)
Ex. 1: MemorySession.global().allocateUtf8String("HelloWordl").setUtf8String(-1, "JavaWorld");
Ex.2: MemorySession.global().allocateUtf8String("HelloWordl").getUtf8String(-1);
2. MemoryAddress.ofLong - Caution to the programmer of VM crash due to unsafe or incorrect usage (like there is for MemoryAddress.get/setUtf8String)
Ex: MemoryAddress.ofLong(Long.MAX_VALUE).getUtf8String(0)