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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 22
    • Affects Version/s: 22
    • Component/s: 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

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Prashanthram Gundarlahally
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: