RFR: 8318127: align_up has potential overflow [v3]
Kim Barrett
kbarrett at openjdk.org
Tue Oct 1 17:56:36 UTC 2024
On Tue, 1 Oct 2024 14:39:10 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.
>
> 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
Add at least one death test (TEST_VM_ASSERT) for align_up hitting the assertion.
-------------
Changes requested by kbarrett (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20808#pullrequestreview-2341029473
More information about the hotspot-dev
mailing list