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

MemorySegment.setString(long, String, Charset) throws IAE(Misaligned access)

XMLWordPrintable

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

      Code snippet to get issue:

      String str = "Hello World";
      MemorySegment.ofArray(new byte[(str.length()+1)*4]).setString(0, str, StandardCharsets.UTF_32);

      Same outcome with UTF_16 charset

            mcimadamore Maurizio Cimadamore
            pgundarlahal Prashanthram Gundarlahally
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: