RFR: 8369393: NMT: poison the canaries of malloc header under ASAN build [v16]
Afshin Zafari
azafari at openjdk.org
Fri Nov 7 08:53:27 UTC 2025
On Wed, 5 Nov 2025 09:21:38 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fixed problem after merge
>
> src/hotspot/share/nmt/mallocHeader.hpp line 155:
>
>> 153:
>> 154: uint8_t* footer_address() const { return ((address)this) + sizeof(MallocHeader) + size(); }
>> 155:
>
> Why is this moved to the public interface? If it's for the tests, then use a fixture class and a `friend class` declaration in `MallocHeader`.
No need. Moved to private.
> src/hotspot/share/nmt/mallocHeader.hpp line 189:
>
>> 187: AsanPoisoningHelper aph(&_canary);
>> 188: return _canary;
>> 189: }
>
> Why is this moved to the public interface?
No reason to be public. Moved to private.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27685#discussion_r2502180493
PR Review Comment: https://git.openjdk.org/jdk/pull/27685#discussion_r2502179380
More information about the hotspot-runtime-dev
mailing list