Bulk copy from segment to array should disallow boolean layouts

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: repo-panama
    • Component/s: core-libs

      Copying from a segment to an `boolean` array in bulk is problematic, as the JVM expects boolean values to be normalized. For this reasons, e.g. MemorySegment::toArray(boolean[]) is not supported.

      I believe there's a bug in that the FFM API allows to copy a memory segment to a boolean array - even though no normalization is being applied.

      I think we should disable both ValueLayout::ofBoolean (and perhaps also ValueLayout::ofAddress) from all bulk copy methods.

            Assignee:
            Unassigned
            Reporter:
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: