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

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

    XMLWordPrintable

Details

    Backports

      Description

        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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: