Integrated: JDK-8284178: os::commit_memory() should assert the given range
Thomas Stuefe
stuefe at openjdk.java.net
Sun Apr 10 17:02:35 UTC 2022
On Fri, 1 Apr 2022 12:58:47 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Trivial fix to assert that ranges given to os::commit/uncommit/release_memory are not empty.
>
> I recently hunted an error where the memory reservation failed, was not handled, and the null pointer was accidentally passed to os::commit_memory(). The resulting `mmap()` failed and this looked like a commit error, when it really was a reservation error. An assert would have saved me time.
This pull request has now been integrated.
Changeset: 34914f12
Author: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/34914f12bee75045e686b5bbe16ec24d116533d5
Stats: 11 lines in 1 file changed: 11 ins; 0 del; 0 mod
8284178: os::commit_memory() should assert the given range
Reviewed-by: shade
-------------
PR: https://git.openjdk.java.net/jdk/pull/8075
More information about the hotspot-runtime-dev
mailing list