SegmentAllocator:allocate(long bytesSize) not throwing IAEx when bytesSize < 0

XMLWordPrintable

        As per spec : https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/lang/foreign/SegmentAllocator.html#allocate(long)
        Throws:
        IllegalArgumentException - if bytesSize < 0

        Observed that IAEx is thrown only for SegmentAllocator created with implicitAllocator() not for others.

        Attached the sample to demonstrate the issue.

              Assignee:
              Maurizio Cimadamore
              Reporter:
              Krushnareddy Ganapureddy
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: