RFR: 8361487: [ubsan] test_committed_virtualmemory.cpp check_covered_pages shows overflow [v4]
Johan Sjölen
jsjolen at openjdk.org
Fri Nov 14 07:52:08 UTC 2025
On Thu, 13 Nov 2025 15:31:52 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> In the test, page-numbers to be checked are passed to a checker function in which they will be changed to `-1` if they are as expected.
>> Use of these `-1` values for page-numbers in consequent checks result in overflow in pointer arithmetic of `base + (-1) * page_size` which is certainly less than `base`.
>>
>> The fix is to skip cases where page-number under checking is `-1`.
>> Tested under UBSAN build.
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>
> style and not constexpr
Marked as reviewed by jsjolen (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/28151#pullrequestreview-3463374822
More information about the hotspot-runtime-dev
mailing list