RFR: 8364198: NMT should have a better corruption message

Aleksey Shipilev shade at openjdk.org
Mon Jul 28 17:48:53 UTC 2025


On Mon, 28 Jul 2025 14:14:26 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Hi,
> 
> When NMT detects a memory corruption it outputs "NMT corruption" and some helpful metadata. I'd like to change the prefix to "NMT has detected a memory corruption bug.". I want to do this because the old message sounds like it is NMT itself that has become corrupted, which is not what's happened. Instead, it should be clear that NMT has helped detect a bug stemming from somewhere else. This is meant to help avoid someone misunderstanding the message.

Makes sense. I am not sure about the "bug" part. Also, do we care about mentioning NMT at all? I think a useful template is GCC malloc:


*** glibc detected *** malloc(): memory corruption


Something like below would do, I think.


NMT detected memory corruption. Block at ...


...or even:


Memory corruption detected. Block at ...

-------------

PR Review: https://git.openjdk.org/jdk/pull/26507#pullrequestreview-3063991444


More information about the hotspot-runtime-dev mailing list