JDK-8345342 : Extend NMT, so that it can help catch memory corruptions
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2024-12-02
  • Updated: 2025-12-09
  • Resolved: 2025-12-09
Related Reports
Relates :  
Relates :  
Description
NMT offers canaries that provides basic underflow/overflow protection (and which we are currently considering removing), but for issues, like JDK-8345147 it would help. Also, it could offer more memory debug features like some OS'es do, for example: https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html

NMT could record values of every memory allocation, so it could perform checks, such as:

- double free
- pointer validation

It would be slow, but might help in cases such as JDK-8345147

We could add "debug" level to the existing NMT "off, summary, detailed" levels.
Comments
NMT triage: won't fix, not a priority
09-12-2025