RFR: 8318127: align_up has potential overflow
Casper Norrbin
duke at openjdk.org
Wed Sep 4 11:27:44 UTC 2024
Hi everyone,
The `align_up` function contained code which could potentially overflow and produce an incorrect result. This PR adds an assert to check for such.
Additionally, a test case that previously caused an overflow has been updated to use the highest possible non-aligned value that does not trigger an overflow.
-------------
Commit messages:
- change reserve_memory test
- align overflow check
Changes: https://git.openjdk.org/jdk/pull/20808/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20808&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8318127
Stats: 6 lines in 3 files changed: 2 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/20808.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20808/head:pull/20808
PR: https://git.openjdk.org/jdk/pull/20808
More information about the hotspot-dev
mailing list