RFR: 8346866: [ASAN] memoryReserver.cpp reported applying non-zero offset to non-null pointer produced null pointer [v8]
SendaoYan
syan at openjdk.org
Tue Jan 7 12:28:59 UTC 2025
> 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:
convert attach_point to size_t ang then convert to char* again, to avoid ubsan report "produced null pointer" fail.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22897/files
- new: https://git.openjdk.org/jdk/pull/22897/files/bfc8521f..7d8299d5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22897&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22897&range=06-07
Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/22897.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22897/head:pull/22897
PR: https://git.openjdk.org/jdk/pull/22897
More information about the hotspot-runtime-dev
mailing list