Integrated: 8318127: align_up has potential overflow

Casper Norrbin cnorrbin at openjdk.org
Wed Nov 27 12:30:46 UTC 2024


On Mon, 2 Sep 2024 09:41:29 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 49480628
Author:    Casper Norrbin <cnorrbin at openjdk.org>
Committer: Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/494806286f126b29b7fc6eb217fa2ae26f295072
Stats:     38 lines in 3 files changed: 33 ins; 0 del; 5 mod

8318127: align_up has potential overflow

Reviewed-by: kbarrett, dlong

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

PR: https://git.openjdk.org/jdk/pull/20808


More information about the hotspot-dev mailing list