RFR: 8318127: align_up has potential overflow [v3]

Casper Norrbin cnorrbin at openjdk.org
Tue Oct 1 14:39:10 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, two test case that previously caused an overflow have been updated to use the highest possible values that do not trigger an overflow.

Casper Norrbin has refreshed the contents of this pull request, and previous commits have been removed. Incremental views are not available. The pull request now contains two commits:

 - change reserve_memory test
 - align overflow check

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20808/files
  - new: https://git.openjdk.org/jdk/pull/20808/files/f1240c06..e50e1661

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20808&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20808&range=01-02

  Stats: 9 lines in 3 files changed: 0 ins; 6 del; 3 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