RFR: 8361487: [ubsan] test_committed_virtualmemory.cpp check_covered_pages shows overflow [v4]
Paul Hübner
phubner at openjdk.org
Fri Nov 14 08:39:07 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
Thanks for doing this.
-------------
Marked as reviewed by phubner (Author).
PR Review: https://git.openjdk.org/jdk/pull/28151#pullrequestreview-3463654131
More information about the hotspot-runtime-dev
mailing list