There is a subtle bug in the heap segment factories: the byte size is computed using an int multiplication instead of a long multiplication. Because of that, it is possible to observe overflow when creating segments out of arrays whose carrier has a byte size greater than one.
------------- Commit messages: - Fix overflow in size computation for heap segments Changes: https://git.openjdk.java.net/jdk/pull/1466/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1466&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8257186 Stats: 29 lines in 2 files changed: 21 ins; 0 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/1466.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1466/head:pull/1466 PR: https://git.openjdk.java.net/jdk/pull/1466