RFR: 8369393: NMT: poison the canaries of malloc header under ASAN build [v23]
Afshin Zafari
azafari at openjdk.org
Wed Nov 19 10:11:15 UTC 2025
> NMT can detect malloc'd memory corruption using canary tests at header and footer of every memory region. This can only be done at free time of the memory where NMT checks the canaries and report error if they are not as expected.
> In this PR, the canary parts also are poisoned using ASAN API to get notified whenever a read/write op is done. on the canary parts. `_size` member of the malloc header is also poisoned, since it is used for finding the footer address.
Afshin Zafari has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 28 commits:
- Merge remote-tracking branch 'origin/master' into _20251006_asan_hdr_footer
- review comments applied
- improvements.
- order of includes corrected.
- fixes after merge.
- Merge remote-tracking branch 'origin/master' into _20251006_asan_hdr_footer
- review comments applied.
- fixed problem after merge
- Merge remote-tracking branch 'jdksjolen/test-canary' into _20251006_asan_hdr_footer
- A different way
- ... and 18 more: https://git.openjdk.org/jdk/compare/99135d2e...bc265745
-------------
Changes: https://git.openjdk.org/jdk/pull/27685/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27685&range=22
Stats: 225 lines in 8 files changed: 185 ins; 5 del; 35 mod
Patch: https://git.openjdk.org/jdk/pull/27685.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27685/head:pull/27685
PR: https://git.openjdk.org/jdk/pull/27685
More information about the hotspot-runtime-dev
mailing list