RFR: JDK-8295889: NMT preinit code does not handle allocation errors
Thomas Stuefe
stuefe at openjdk.org
Wed Oct 26 05:37:24 UTC 2022
On Wed, 26 Oct 2022 05:15:35 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Doesn't seem unreasonable to check for OOM even though highly unlikely during VM init. But how would an overflow arise in practice? Seems like something more suited for an assertion.
Hi David,
thanks for looking at this. Assert makes sense, I will do that. It can happen only by malpractice, if size is controlled via outside input. I cannot see a path where this would happen in VM preinit time though, so this is just theoretical.
The issue was inspired by 8286519, where Harold did the same os::malloc. That made me look more closely at some corner cases and how they are handled. Another issue I work on is https://bugs.openjdk.org/browse/JDK-8295865.
-------------
PR: https://git.openjdk.org/jdk/pull/10855
More information about the hotspot-runtime-dev
mailing list