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

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Dec 12 12:07:15 UTC 2023


On Tue, 12 Dec 2023 11:49:17 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> True. But we will get the wrong type of exception.
>
> We could change the exception type to `ArithmeticException` in this case and get performance and correctness at the same time.

I simply don't think we should be using `multiplyExact` here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17079#discussion_r1423896653


More information about the core-libs-dev mailing list