Integrated: 8366925: Improper std::nothrow new expression in NativeHeapTrimmerThread ctor

Guanqiang Han ghan at openjdk.org
Tue Sep 16 08:05:04 UTC 2025


On Mon, 15 Sep 2025 01:01:17 GMT, Guanqiang Han <ghan at openjdk.org> wrote:

> Please review this Patch.
> 
> **Description:**
> Add null check for _lock in NativeHeapTrimmerThread constructor. If allocation of the lock fails (_lock == nullptr), it indicates an out-of-memory condition. Since even this small allocation failed, it's unlikely that subsequent operations would succeed, so we terminate the JVM immediately.

This pull request has now been integrated.

Changeset: 3ba2e748
Author:    Guanqiang Han <ghan at openjdk.org>
Committer: Albert Mingkun Yang <ayang at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/3ba2e748d61a9ed8098093c6d4732973051808b2
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8366925: Improper std::nothrow new expression in NativeHeapTrimmerThread ctor

Reviewed-by: ayang, kbarrett, dholmes

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

PR: https://git.openjdk.org/jdk/pull/27275


More information about the hotspot-runtime-dev mailing list