RFR: 8257186: Size of heap segments is not computed correctlyFix overflow in size computation for heap segments
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Thu Nov 26 18:34:03 UTC 2020
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
More information about the core-libs-dev
mailing list