Integrated: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

Per Minborg pminborg at openjdk.org
Mon Jan 8 08:23:31 UTC 2024


On Tue, 12 Dec 2023 10:02:00 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> This PR proposes to change the specification for some methods that take `long` offsets so that they will throw an `IllegalArgumentException` rather than an `IndexOutOfBoundsException` for negative values.
> 
> The PR also proposes to fix a bug where the allocation size would overflow and the specified exception was not thrown.

This pull request has now been integrated.

Changeset: 7edd10e5
Author:    Per Minborg <pminborg at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/7edd10e5fa71dafbbad23455553b7f5ff0a75ac9
Stats:     239 lines in 13 files changed: 200 ins; 21 del; 18 mod

8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

Reviewed-by: mcimadamore

-------------

PR: https://git.openjdk.org/jdk/pull/17079


More information about the core-libs-dev mailing list