RFR: 8369393: NMT: poison the canaries of malloc header under ASAN build [v20]
Afshin Zafari
azafari at openjdk.org
Mon Nov 10 11:14:54 UTC 2025
On Mon, 10 Nov 2025 10:36:20 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
> Makes sense, since we also want to catch one-byte-overwrites. Though I would probably just disable NMT and do it that way.
One big difference here is that NMT detects overflow/underflow only at free-ing the memory. Using ASAN poisoning, we can find the writer/reader immediately. Also, NMT reports the malloc-site (where in the source the memory is allocated) and we don't get any info about where in the code the corruption happened.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27685#issuecomment-3510937980
More information about the hotspot-runtime-dev
mailing list