RFR: 8369393: NMT: poison the malloc header and footer under ASAN build [v2]
Paul Hübner
phubner at openjdk.org
Wed Dec 17 09:02:28 UTC 2025
On Wed, 3 Dec 2025 14:43:45 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> src/hotspot/share/nmt/mallocHeader.inline.hpp line 170:
>>
>>> 168: ASAN_UNPOISON_MEMORY_REGION(header->footer_address(), footer_size);
>>> 169: resolve_checked(memblock);
>>> 170: header->mark_block_as_dead();
>>
>> Unrelated to this PR: is there a reason we `mark_block_as_dead()` but `revive()` as opposed to `mark_block_as_revived()`?
>
> I prefer `mark_block_as_alive()` with no assertion on being already `dead`. `revive()` with assertion that it has to be `dead` already. Thoughts?
Works for me. But I see no assertion in the current code that asserts it has to be dead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28503#discussion_r2585410681
More information about the hotspot-runtime-dev
mailing list