RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario
Per Minborg
pminborg at openjdk.org
Tue Dec 12 10:09:45 UTC 2023
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.
-------------
Commit messages:
- Change the exception thrown for certain negative long values
Changes: https://git.openjdk.org/jdk/pull/17079/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17079&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8321786
Stats: 185 lines in 9 files changed: 162 ins; 12 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/17079.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17079/head:pull/17079
PR: https://git.openjdk.org/jdk/pull/17079
More information about the core-libs-dev
mailing list