RFR: JDK-8277822: Remove debug-only heap overrun checks in os::malloc and friends [v3]

Thomas Stuefe stuefe at openjdk.java.net
Fri Jan 14 19:33:30 UTC 2022


On Fri, 14 Jan 2022 19:26:15 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> jniCheck.cpp was double guarded, yes. It's also horrible since it does a complete copy of the user buffer, including payload. I'd love to throw it away, have actually planned for it. But people get suspicious if I remove too much in a single RFE, therefore I wanted to keep this for a separate discussion. The discussion, in this case, is that we would have to bind NMT=enabled to -XcheckJni to get NMT to take care of overflow checks.
>
> Hm, yes, I see maybe it's not a good idea since NMT is enabled by default only on debug and Xcheck:jni is a product level feature.  Maybe Xcheck:jni can turn on NMT though.  I suppose that would be ok.

I had the same thought, but it would be good to have this discussion separately.

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

PR: https://git.openjdk.java.net/jdk/pull/6554


More information about the hotspot-runtime-dev mailing list