RFR: 8346866: [ASAN] memoryReserver.cpp reported applying non-zero offset to non-null pointer produced null pointer [v5]

SendaoYan syan at openjdk.org
Tue Jan 7 11:57:08 UTC 2025


On Tue, 7 Jan 2025 08:02:07 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace "(size_t) highest_start" instead as 1
>
> src/hotspot/share/memory/memoryReserver.cpp line 433:
> 
>> 431:   // At least one is possible even for 0 sized attach range.
>> 432:   const uint64_t num_attempts_possible = (attach_range / attach_point_alignment) + 1;
>> 433:   const uint64_t num_attempts_to_try   = MIN2((uint64_t)HeapSearchSteps, num_attempts_possible);
> 
> pre-existing, but github won't let me comment on line 429.  That pointer subtraction should be using
> `pointer_delta(highest_start, lowest_start)`.

Thanks, pointer substraction has been replaced as `pointer_delta`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22897#discussion_r1905347148


More information about the hotspot-runtime-dev mailing list