RFR: 8346866: [ASAN] memoryReserver.cpp reported applying non-zero offset to non-null pointer produced null pointer [v11]
Stefan Karlsson
stefank at openjdk.org
Tue Jan 21 13:45:37 UTC 2025
On Wed, 8 Jan 2025 04:42:13 GMT, SendaoYan <syan at openjdk.org> wrote:
>> Hi all,
>> This PR add an extra loop condition check `p2u(attach_point) > stepsize` in function `HeapReserver::Instance::try_reserve_range` to make sure the loop will not wrap around, and make UndefinedBehaviorSanitizer silent. The change do not change the original logic, risk is low.
>>
>> Additional testing:
>>
>> - [x] jtreg tests(include tier1/2/3 etc., which include tests added by [PR22712](https://github.com/openjdk/jdk/pull/22712)) on linux-x64 with release build
>> - [x] jtreg tests(include tier1/2/3 etc., which include tests added by [PR22712](https://github.com/openjdk/jdk/pull/22712)) on linux-x64 with fastdebug build
>> - [x] jtreg tests(include tier1/2/3 etc., which include tests added by [PR22712](https://github.com/openjdk/jdk/pull/22712)) on linux-aarch64 with release build
>> - [x] jtreg tests(include tier1/2/3 etc., which include tests added by [PR22712](https://github.com/openjdk/jdk/pull/22712)) on linux-aarch64 with fastdebug build
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>
> Use sizeof(char) instead of sizeof(char*) pass to pointer_delta
> I think this is good, but get an up-to-date review from someone else too, since this is pretty different from what @stefank reviewed.
FWIW, I actually sat down with Axel tweaked the patch with him before it was published here.
-------------
Marked as reviewed by stefank (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22897#pullrequestreview-2564673854
More information about the hotspot-runtime-dev
mailing list