RFR: 8346866: [ASAN] memoryReserver.cpp reported applying non-zero offset to non-null pointer produced null pointer [v2]
SendaoYan
syan at openjdk.org
Thu Jan 2 09:21:14 UTC 2025
On Thu, 2 Jan 2025 08:31:57 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add "attach_point <= stepsize" check at the end of for loop, to make sanitizer silent and avoid warp around.
>
> src/hotspot/share/memory/memoryReserver.cpp line 440:
>
>> 438: // Try attach points from top to bottom.
>> 439: for (char* attach_point = highest_start;
>> 440: attach_point >= lowest_start; // Avoid wrap around.
>
> The comment is no longer true or relevant. That comment was about the clause that is being removed.
The unrelevant comment has been removed.
> src/hotspot/share/memory/memoryReserver.cpp line 455:
>
>> 453:
>> 454: if (p2u(attach_point) <= stepsize)
>> 455: break; // Make sanizier silent and avoid warp around.
>
> Sanitizer isn't interesting. The point is this avoids pointer underflow. Also, braces are required for multiline
> `if` statements - see style guide.
Thanks @kimbarrett, the comment has been updated, and the braces has been added.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22897#discussion_r1900673469
PR Review Comment: https://git.openjdk.org/jdk/pull/22897#discussion_r1900674391
More information about the hotspot-runtime-dev
mailing list