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:22:36 UTC 2022
On Fri, 14 Jan 2022 17:23:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/runtime/os.cpp line 41:
>>
>>> 39: #include "logging/logStream.hpp"
>>> 40: #include "memory/allocation.inline.hpp"
>>> 41: #include "memory/guardedMemory.hpp"
>>
>> Should this file now be deleted if not used?
>
> I see it's used in jniCheck.cpp - was it double-guarded ? It's ok to leave this maybe to investigate for another time.
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6554
More information about the hotspot-runtime-dev
mailing list