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

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.

              mcimadamore Maurizio Cimadamore
              kganapureddy Krushnareddy Ganapureddy
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: