Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8295780

API doc enhancement needed for MemorySegment.get/setUtf8String, MemoryAddress.ofLong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • 19
    • core-libs

      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)

            pminborg Per-Ake Minborg
            pgundarlahal Prashanthram Gundarlahally
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: